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

pepjs-offset

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pepjs-offset - npm Package Compare versions

Comparing version 0.4.7 to 0.4.8

31

dist/pep.js

@@ -104,4 +104,31 @@ /*!

e.isPrimary = inDict.isPrimary || false;
e.offsetX = inDict.offsetX;
e.offsetY = inDict.offsetY;
var rect;
function boundingClientRect() {
if (rect) {
return rect;
}
return (rect = inDict.target.getBoundingClientRect());
}
if (inDict.offsetX === undefined) {
Object.defineProperty(e, 'offsetX', {
get: function() {
return e.clientX - boundingClientRect().left - inDict.target.clientLeft;
}
});
} else {
e.offsetX = inDict.offsetX;
}
if (inDict.offsetY === undefined) {
Object.defineProperty(e, 'offsetY', {
get: function() {
return e.clientY - boundingClientRect().top - inDict.target.clientTop;
}
});
} else {
e.offsetY = inDict.offsetY;
}
return e;

@@ -108,0 +135,0 @@ }

2

package.json
{
"name": "pepjs-offset",
"version": "0.4.7",
"version": "0.4.8",
"main": "dist/pep.js",

@@ -5,0 +5,0 @@ "description": "Polyfill of the PointerEvents W3C spec",

@@ -93,4 +93,31 @@ /**

e.isPrimary = inDict.isPrimary || false;
e.offsetX = inDict.offsetX;
e.offsetY = inDict.offsetY;
var rect;
function boundingClientRect() {
if (rect) {
return rect;
}
return (rect = inDict.target.getBoundingClientRect());
}
if (inDict.offsetX === undefined) {
Object.defineProperty(e, 'offsetX', {
get: function() {
return e.clientX - boundingClientRect().left - inDict.target.clientLeft;
}
});
} else {
e.offsetX = inDict.offsetX;
}
if (inDict.offsetY === undefined) {
Object.defineProperty(e, 'offsetY', {
get: function() {
return e.clientY - boundingClientRect().top - inDict.target.clientTop;
}
});
} else {
e.offsetY = inDict.offsetY;
}
return e;

@@ -97,0 +124,0 @@ }

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