Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pure-canvas

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pure-canvas - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

29

lib/Stage.js

@@ -52,12 +52,21 @@ "use strict";

Stage.prototype.emitHitEvent = function (name, event) {
var point = this.eventToElementCoordinate(event);
var results = this.tree
.search({ minX: point.x, minY: point.y, maxX: point.x, maxY: point.y })
.sort(function (a, b) { return b.zIndex - a.zIndex; })
.map(function (indexedNode) {
var untransformedPoint = indexedNode.transformers.reduceRight(function (point, transformer) { return transformer.untransform(point); }, point);
return indexedNode.node.intersection(untransformedPoint);
})
.filter(Boolean);
this.emit(name, results[0], event);
var _this = this;
var didSearch = false;
var result = undefined;
this.emit(name, function () {
if (!didSearch) {
var point_1 = _this.eventToElementCoordinate(event);
var results = _this.tree
.search({ minX: point_1.x, minY: point_1.y, maxX: point_1.x, maxY: point_1.y })
.sort(function (a, b) { return b.zIndex - a.zIndex; })
.map(function (indexedNode) {
var untransformedPoint = indexedNode.transformers.reduceRight(function (point, transformer) { return transformer.untransform(point); }, point_1);
return indexedNode.node.intersection(untransformedPoint);
})
.filter(Boolean);
result = results[0];
didSearch = true;
}
return result;
}, event);
};

@@ -64,0 +73,0 @@ Stage.prototype.render = function () {

{
"name": "pure-canvas",
"version": "0.1.4",
"version": "0.1.5",
"description": "TODO",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc