react-gauge-component
Advanced tools
Comparing version 1.2.11 to 1.2.21
@@ -68,3 +68,4 @@ "use strict"; | ||
}; | ||
var onArcMouseLeave = function (event, d, gauge) { | ||
var onArcMouseLeave = function (event, d, gauge, mousemoveCbThrottled) { | ||
mousemoveCbThrottled.cancel(); | ||
(0, exports.hideTooltip)(gauge); | ||
@@ -200,6 +201,7 @@ if (d.data.onMouseLeave != undefined) | ||
(0, exports.applyColors)(outerArcSubarcs, gauge); | ||
var mousemoveCbThrottled_1 = (0, lodash_1.throttle)(function (event, d) { return onArcMouseMove(event, d, gauge); }, 20); | ||
arcPaths | ||
.on("mouseleave", function (event, d) { return onArcMouseLeave(event, d, gauge); }) | ||
.on("mouseleave", function (event, d) { return onArcMouseLeave(event, d, gauge, mousemoveCbThrottled_1); }) | ||
.on("mouseout", function (event, d) { return onArcMouseOut(event, d, gauge); }) | ||
.on("mousemove", (0, lodash_1.throttle)(function (event, d) { return onArcMouseMove(event, d, gauge); }, 20)) | ||
.on("mousemove", mousemoveCbThrottled_1) | ||
.on("click", function (event, d) { return onArcMouseClick(event, d); }); | ||
@@ -242,6 +244,7 @@ } | ||
(0, exports.applyColors)(subArcs, gauge); | ||
var mousemoveCbThrottled = (0, lodash_1.throttle)(function (event, d) { return onArcMouseMove(event, d, gauge); }, 20); | ||
arcPaths | ||
.on("mouseleave", function (event, d) { return onArcMouseLeave(event, d, gauge); }) | ||
.on("mouseleave", function (event, d) { return onArcMouseLeave(event, d, gauge, mousemoveCbThrottled); }) | ||
.on("mouseout", function (event, d) { return onArcMouseOut(event, d, gauge); }) | ||
.on("mousemove", (0, lodash_1.throttle)(function (event, d) { return onArcMouseMove(event, d, gauge); }, 20)) | ||
.on("mousemove", mousemoveCbThrottled) | ||
.on("click", function (event, d) { return onArcMouseClick(event, d); }); | ||
@@ -248,0 +251,0 @@ }; |
@@ -360,5 +360,3 @@ "use strict"; | ||
var angle = startAngle + (valuePercentage * 100) * endAngle / 100; | ||
var halfInPercentage = utils.calculatePercentage(minValue, maxValue, (maxValue / 2)); | ||
var halfPercentage = halfInPercentage; | ||
var isValueLessThanHalf = valuePercentage < halfPercentage; | ||
var isValueLessThanHalf = valuePercentage < 0.5; | ||
//Values between 40% and 60% are aligned in the middle | ||
@@ -365,0 +363,0 @@ var isValueBetweenTolerance = valuePercentage > constants_1.default.rangeBetweenCenteredTickValueLabel[0] && |
@@ -20,3 +20,3 @@ "use strict"; | ||
else if (value > maxValue) { | ||
return 100; | ||
return 1; | ||
} | ||
@@ -23,0 +23,0 @@ else { |
{ | ||
"name": "react-gauge-component", | ||
"version": "1.2.11", | ||
"version": "1.2.21", | ||
"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
114808
2007