technology-chart
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -919,29 +919,31 @@ (function (global, factory) { | ||
var _a; | ||
var mouseX = e.x; | ||
var mouseY = e.y; | ||
var canvasX = _this._canvas.offsetLeft; | ||
var canvasY = _this._canvas.offsetTop; | ||
var x = mouseX - canvasX; | ||
var y = mouseY - canvasY; | ||
for (var _i = 0, _b = _this._objects; _i < _b.length; _i++) { | ||
var object = _b[_i]; | ||
if (object instanceof QuadrantRing) { | ||
var collideItem = object.verifyColision({ x: x, y: y }); | ||
if (collideItem != null) { | ||
_this._canvas.style.cursor = "pointer"; | ||
if (((_a = _this._currPointFocus) === null || _a === void 0 ? void 0 : _a.index) !== collideItem.index) { | ||
_this._currPointFocus = collideItem; | ||
_this.emit("pointhoverin", collideItem); | ||
if (typeof window !== "undefined") { | ||
var mouseX = e.x + window.scrollX; | ||
var mouseY = e.y + window.scrollY; | ||
var canvasX = _this._canvas.offsetLeft; | ||
var canvasY = _this._canvas.offsetTop; | ||
var x = mouseX - canvasX; | ||
var y = mouseY - canvasY; | ||
for (var _i = 0, _b = _this._objects; _i < _b.length; _i++) { | ||
var object = _b[_i]; | ||
if (object instanceof QuadrantRing) { | ||
var collideItem = object.verifyColision({ x: x, y: y }); | ||
if (collideItem != null) { | ||
_this._canvas.style.cursor = "pointer"; | ||
if (((_a = _this._currPointFocus) === null || _a === void 0 ? void 0 : _a.index) !== collideItem.index) { | ||
_this._currPointFocus = collideItem; | ||
_this.emit("pointhoverin", collideItem); | ||
} | ||
return; | ||
} | ||
return; | ||
else { | ||
_this._canvas.style.cursor = "default"; | ||
} | ||
} | ||
else { | ||
_this._canvas.style.cursor = "default"; | ||
} | ||
} | ||
if (_this._currPointFocus != null) { | ||
_this.emit("pointhoverout", _this._currPointFocus); | ||
} | ||
_this._currPointFocus = null; | ||
} | ||
if (_this._currPointFocus != null) { | ||
_this.emit("pointhoverout", _this._currPointFocus); | ||
} | ||
_this._currPointFocus = null; | ||
}); | ||
@@ -948,0 +950,0 @@ }; |
{ | ||
"name": "technology-chart", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Vanilla library for create technology radar chart using canvas API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.min.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
50798
1362