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

@interactjs/offset

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interactjs/offset - npm Package Compare versions

Comparing version 1.10.26 to 1.10.27

10

package.json
{
"name": "@interactjs/offset",
"version": "1.10.26",
"version": "1.10.27",
"main": "index",

@@ -13,7 +13,7 @@ "module": "index",

"peerDependencies": {
"@interactjs/core": "1.10.26",
"@interactjs/utils": "1.10.26"
"@interactjs/core": "1.10.27",
"@interactjs/utils": "1.10.27"
},
"optionalDependencies": {
"@interactjs/interact": "1.10.26"
"@interactjs/interact": "1.10.27"
},

@@ -28,3 +28,3 @@ "publishConfig": {

"license": "MIT",
"gitHead": "6e7a136f"
"gitHead": "3ace1cad"
}
/**
* interact.js 1.10.26
* interact.js 1.10.27
*

@@ -4,0 +4,0 @@ * Copyright (c) 2012-present Taye Adeyemi <dev@taye.me>

@@ -1,4 +0,4 @@

/* interact.js 1.10.26 | https://raw.github.com/taye/interact.js/main/LICENSE */
/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */
import{_ProxyMethods}from"../core/Interaction.prod.js";import*as rectUtils from"../utils/rect.prod.js";function addTotal(t){t.pointerIsDown&&(addToCoords(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}function beforeAction(t){let{interaction:e}=t;applyPending(e)}function beforeEnd(t){let{interaction:e}=t;if(applyPending(e))return e.move({offset:!0}),e.end(),!1}function end(t){let{interaction:e}=t;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}function applyPending(t){if(!hasPending(t))return!1;const{pending:e}=t.offset;return addToCoords(t.coords.cur,e),addToCoords(t.coords.delta,e),rectUtils.addEdges(t.edges,t.rect,e),e.x=0,e.y=0,!0}function offsetBy(t){let{x:e,y:o}=t;this.offset.pending.x+=e,this.offset.pending.y+=o,this.offset.total.x+=e,this.offset.total.y+=o}function addToCoords(t,e){let{page:o,client:n}=t,{x:i,y:f}=e;o.x+=i,o.y+=f,n.x+=i,n.y+=f}function hasPending(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}_ProxyMethods.offsetBy="";const offset={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install(t){t.Interaction.prototype.offsetBy=offsetBy},listeners:{"interactions:new"(t){let{interaction:e}=t;e.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer"(t){let{interaction:e}=t;return addTotal(e)},"interactions:before-action-start":beforeAction,"interactions:before-action-move":beforeAction,"interactions:before-action-end":beforeEnd,"interactions:stop":end}};export{addTotal,applyPending,offset as default};
//# sourceMappingURL=plugin.prod.js.map
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