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

@vx/event

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vx/event - npm Package Compare versions

Comparing version 0.0.179 to 0.0.182

20

build/index.js

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -6,21 +6,19 @@ Object.defineProperty(exports, "__esModule", {

});
var _localPoint = require('./localPoint');
Object.defineProperty(exports, 'localPoint', {
Object.defineProperty(exports, "localPoint", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_localPoint).default;
return _localPoint.default;
}
});
var _touchPoint = require('./touchPoint');
Object.defineProperty(exports, 'touchPoint', {
Object.defineProperty(exports, "touchPoint", {
enumerable: true,
get: function get() {
return _interopRequireDefault(_touchPoint).default;
return _touchPoint.default;
}
});
var _localPoint = _interopRequireDefault(require("./localPoint"));
var _touchPoint = _interopRequireDefault(require("./touchPoint"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -8,34 +8,29 @@ Object.defineProperty(exports, "__esModule", {

var _point = require('@vx/point');
var _point = require("@vx/point");
function localPoint(node, event) {
// called with no args
if (!node) return;
if (!node) return; // called with localPoint(event)
// called with localPoint(event)
if (node.target) {
event = node;
event = node; // set node to targets owner svg
// set node to targets owner svg
node = event.target.ownerSVGElement;
node = event.target.ownerSVGElement; // find the outermost svg
// find the outermost svg
while (node.ownerSVGElement) {
node = node.ownerSVGElement;
}
}
} // default to mouse event
// default to mouse event
var _event = event,
clientX = _event.clientX,
clientY = _event.clientY;
clientY = _event.clientY; // support touch event
// support touch event
if (event.changedTouches) {
clientX = event.changedTouches[0].clientX;
clientY = event.changedTouches[0].clientY;
}
} // calculate coordinates from svg
// calculate coordinates from svg
if (node.createSVGPoint) {

@@ -50,5 +45,5 @@ var point = node.createSVGPoint();

});
}
} // fallback to calculating position from non-svg dom node
// fallback to calculating position from non-svg dom node
var rect = node.getBoundingClientRect();

@@ -55,0 +50,0 @@ return new _point.Point({

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -8,3 +8,3 @@ Object.defineProperty(exports, "__esModule", {

var _point = require('@vx/point');
var _point = require("@vx/point");

@@ -14,2 +14,3 @@ function touchPoint(node, event) {

var svg = node.ownerSVGElement || node;
if (svg.createSVGPoint) {

@@ -25,2 +26,3 @@ var point = svg.createSVGPoint();

}
var rect = node.getBoundingClientRect();

@@ -27,0 +29,0 @@ return new _point.Point({

@@ -5,30 +5,25 @@ import { Point } from '@vx/point';

// called with no args
if (!node) return;
if (!node) return; // called with localPoint(event)
// called with localPoint(event)
if (node.target) {
event = node;
event = node; // set node to targets owner svg
// set node to targets owner svg
node = event.target.ownerSVGElement;
node = event.target.ownerSVGElement; // find the outermost svg
// find the outermost svg
while (node.ownerSVGElement) {
node = node.ownerSVGElement;
}
}
} // default to mouse event
// default to mouse event
var _event = event,
clientX = _event.clientX,
clientY = _event.clientY;
clientY = _event.clientY; // support touch event
// support touch event
if (event.changedTouches) {
clientX = event.changedTouches[0].clientX;
clientY = event.changedTouches[0].clientY;
}
} // calculate coordinates from svg
// calculate coordinates from svg
if (node.createSVGPoint) {

@@ -43,5 +38,5 @@ var point = node.createSVGPoint();

});
}
} // fallback to calculating position from non-svg dom node
// fallback to calculating position from non-svg dom node
var rect = node.getBoundingClientRect();

@@ -57,2 +52,3 @@ return new Point({

var svg = node.ownerSVGElement || node;
if (svg.createSVGPoint) {

@@ -68,2 +64,3 @@ var point = svg.createSVGPoint();

}
var rect = node.getBoundingClientRect();

@@ -70,0 +67,0 @@ return new Point({

{
"name": "@vx/event",
"version": "0.0.179",
"version": "0.0.182",
"description": "vx event",

@@ -11,3 +11,3 @@ "sideEffects": false,

"build:dist": "rm -rf dist && mkdir dist && rollup -c",
"build:babel": "rm -rf build && mkdir build && babel src --out-dir build --ignore node_modules/ --presets stage-0,react,env",
"build:babel": "rm -rf build && mkdir build && babel src --out-dir build --ignore node_modules/ --presets @babel/preset-react,@babel/preset-env",
"prepublish": "npm run build",

@@ -41,9 +41,25 @@ "test": "jest"

"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-jest": "^21.2.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-bind": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.4.2",
"enzyme": "^3.1.0",

@@ -57,4 +73,4 @@ "enzyme-adapter-react-16": "^1.0.2",

"react-test-renderer": "^16.0.0",
"rollup": "^0.59.4",
"rollup-plugin-babel": "^3.0.4",
"rollup": "^0.67.4",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-commonjs": "^9.1.3",

@@ -66,3 +82,3 @@ "rollup-plugin-node-resolve": "^3.3.0",

"dependencies": {
"@vx/point": "0.0.165"
"@vx/point": "0.0.182"
},

@@ -69,0 +85,0 @@ "jest": {

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