react-svg-worldmap
Advanced tools
Comparing version 2.0.0-alpha.11 to 2.0.0-alpha.12
import type { RefObject } from "react"; | ||
export declare function drawTooltip(tip: string | undefined, tooltipBgColor: string, tooltipTextColor: string, triggerRef: RefObject<SVGElement>, containerRef: RefObject<SVGSVGElement>): JSX.Element | null; | ||
export declare function drawTooltip(tip: string | undefined, tooltipBgColor: string, tooltipTextColor: string, rtl: boolean, triggerRef: RefObject<SVGElement>, containerRef: RefObject<SVGSVGElement>): JSX.Element | null; | ||
//# sourceMappingURL=draw.d.ts.map |
@@ -7,6 +7,6 @@ "use strict"; | ||
const react_path_tooltip_1 = require("react-path-tooltip"); | ||
function drawTooltip(tip, tooltipBgColor, tooltipTextColor, triggerRef, containerRef) { | ||
return tip ? (React.createElement(react_path_tooltip_1.PathTooltip, { fontSize: 12, bgColor: tooltipBgColor, textColor: tooltipTextColor, key: tip, pathRef: triggerRef, svgRef: containerRef, tip: tip })) : null; | ||
function drawTooltip(tip, tooltipBgColor, tooltipTextColor, rtl, triggerRef, containerRef) { | ||
return tip ? (React.createElement(react_path_tooltip_1.PathTooltip, { fontSize: 12, bgColor: tooltipBgColor, textColor: tooltipTextColor, key: tip, pathRef: triggerRef, svgRef: containerRef, rtl: rtl, tip: tip })) : null; | ||
} | ||
exports.drawTooltip = drawTooltip; | ||
//# sourceMappingURL=draw.js.map |
@@ -19,3 +19,3 @@ "use strict"; | ||
function WorldMap(props) { | ||
const { data, title, valuePrefix = "", valueSuffix = "", color = constants_js_1.defaultColor, strokeOpacity = 0.2, backgroundColor = "white", tooltipBgColor = "black", tooltipTextColor = "white", size = constants_js_1.defaultSize, frame = false, frameColor = "black", borderColor = "black", richInteraction = false, styleFunction = (0, constants_js_1.defaultCountryStyle)(borderColor, strokeOpacity), tooltipTextFunction = constants_js_1.defaultTooltip, onClickFunction, hrefFunction, textLabelFunction = () => [], } = props; | ||
const { data, title, valuePrefix = "", valueSuffix = "", color = constants_js_1.defaultColor, strokeOpacity = 0.2, backgroundColor = "white", tooltipBgColor = "black", tooltipTextColor = "white", rtl = false, size = constants_js_1.defaultSize, frame = false, frameColor = "black", borderColor = "black", richInteraction = false, styleFunction = (0, constants_js_1.defaultCountryStyle)(borderColor, strokeOpacity), tooltipTextFunction = constants_js_1.defaultTooltip, onClickFunction, hrefFunction, textLabelFunction = () => [], } = props; | ||
const windowWidth = (0, utils_js_1.useWindowWidth)(); | ||
@@ -61,3 +61,3 @@ // Inits | ||
? undefined | ||
: tooltipTextFunction(context), tooltipBgColor, tooltipTextColor, triggerRef, containerRef); | ||
: tooltipTextFunction(context), tooltipBgColor, tooltipTextColor, rtl, triggerRef, containerRef); | ||
return { path, highlightedTooltip: tooltip }; | ||
@@ -64,0 +64,0 @@ }); |
@@ -30,2 +30,3 @@ import type React from "react"; | ||
tooltipTextColor?: string; | ||
rtl?: boolean; | ||
size?: SizeOption | "responsive" | number; | ||
@@ -32,0 +33,0 @@ frame?: boolean; |
{ | ||
"name": "react-svg-worldmap", | ||
"version": "2.0.0-alpha.11", | ||
"version": "2.0.0-alpha.12", | ||
"license": "MIT", | ||
@@ -21,3 +21,3 @@ "displayName": "React Worldmap", | ||
"d3-geo": "^2.0.2", | ||
"react-path-tooltip": "^1.0.17", | ||
"react-path-tooltip": "^1.0.24", | ||
"tslib": "^2.4.0" | ||
@@ -24,0 +24,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
580771
1799
Updatedreact-path-tooltip@^1.0.24