react-gauge-component
Advanced tools
Comparing version 1.2.1 to 1.2.11
@@ -55,3 +55,3 @@ "use strict"; | ||
var GaugeComponent = function (props) { | ||
var _a; | ||
var _a, _b, _c, _d; | ||
var svg = (0, react_1.useRef)({}); | ||
@@ -118,2 +118,3 @@ var tooltip = (0, react_1.useRef)({}); | ||
(0, react_1.useEffect)(function () { | ||
var _a; | ||
var observer = new MutationObserver(function () { | ||
@@ -126,5 +127,5 @@ var _a; | ||
}); | ||
observer.observe(window.document, { attributes: true, subtree: true }); | ||
observer.observe((_a = selectedRef.current) === null || _a === void 0 ? void 0 : _a.parentNode, { attributes: true, subtree: false }); | ||
return function () { return observer.disconnect(); }; | ||
}, [(_a = selectedRef.current) === null || _a === void 0 ? void 0 : _a.parentNode]); | ||
}, [(_b = (_a = selectedRef.current) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.offsetWidth, (_d = (_c = selectedRef.current) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.offsetHeight]); | ||
(0, react_1.useEffect)(function () { | ||
@@ -137,4 +138,4 @@ var handleResize = function () { return chartHooks.renderChart(gauge, true); }; | ||
var id = props.id, style = props.style, className = props.className, type = props.type; | ||
return (react_1.default.createElement("div", { id: id, className: "".concat(className, " ").concat(type == GaugeComponentProps_1.GaugeType.Semicircle ? "semicircle-gauge" : "radial-gauge"), style: style, ref: function (svg) { return (selectedRef.current = svg); } })); | ||
return (react_1.default.createElement("div", { id: id, className: "".concat(gauge.props.type, "-gauge").concat(className ? ' ' + className : ''), style: style, ref: function (svg) { return (selectedRef.current = svg); } })); | ||
}; | ||
exports.default = GaugeComponent; |
{ | ||
"name": "react-gauge-component", | ||
"version": "1.2.1", | ||
"version": "1.2.11", | ||
"main": "dist/lib/index.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/lib/index.js", |
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
114737
2006