@interactjs/offset
Advanced tools
Comparing version 1.9.21 to 1.9.22
{ | ||
"name": "@interactjs/offset", | ||
"version": "1.9.21", | ||
"version": "1.9.22", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@interactjs/core": "1.9.21", | ||
"@interactjs/utils": "1.9.21" | ||
"@interactjs/core": "1.9.22", | ||
"@interactjs/utils": "1.9.22" | ||
}, | ||
"optionalDependencies": { | ||
"@interactjs/interact": "1.9.21" | ||
"@interactjs/interact": "1.9.22" | ||
}, | ||
@@ -12,0 +12,0 @@ "publishConfig": { |
@@ -90,3 +90,3 @@ import { _ProxyMethods } from "../core/Interaction.js"; | ||
id: 'offset', | ||
before: ['modifiers'], | ||
before: ['modifiers', 'pointer-events', 'actions', 'inertia'], | ||
@@ -93,0 +93,0 @@ install(scope) { |
@@ -1,2 +0,2 @@ | ||
import{_ProxyMethods as t}from"../core/Interaction.min.js";import*as n from"../utils/rect.min.js";t.offsetBy="";export function addTotal(t){t.pointerIsDown&&(i(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}function e({interaction:t}){applyPending(t)}export function applyPending(t){if(!function(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}(t))return!1;const{pending:e}=t.offset;return i(t.coords.cur,e),i(t.coords.delta,e),n.addEdges(t.edges,t.rect,e),e.x=0,e.y=0,!0}function o({x:t,y:n}){this.offset.pending.x+=t,this.offset.pending.y+=n,this.offset.total.x+=t,this.offset.total.y+=n}function i({page:t,client:n},{x:e,y:o}){t.x+=e,t.y+=o,n.x+=e,n.y+=o}const f={id:"offset",before:["modifiers"],install(t){t.Interaction.prototype.offsetBy=o},listeners:{"interactions:new"({interaction:t}){t.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer"({interaction:t}){return addTotal(t)},"interactions:before-action-start":e,"interactions:before-action-move":e,"interactions:before-action-end"({interaction:t}){if(applyPending(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop"({interaction:t}){t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}};export default f; | ||
import{_ProxyMethods as t}from"../core/Interaction.min.js";import*as n from"../utils/rect.min.js";t.offsetBy="";export function addTotal(t){t.pointerIsDown&&(i(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}function e({interaction:t}){applyPending(t)}export function applyPending(t){if(!function(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}(t))return!1;const{pending:e}=t.offset;return i(t.coords.cur,e),i(t.coords.delta,e),n.addEdges(t.edges,t.rect,e),e.x=0,e.y=0,!0}function o({x:t,y:n}){this.offset.pending.x+=t,this.offset.pending.y+=n,this.offset.total.x+=t,this.offset.total.y+=n}function i({page:t,client:n},{x:e,y:o}){t.x+=e,t.y+=o,n.x+=e,n.y+=o}const f={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install(t){t.Interaction.prototype.offsetBy=o},listeners:{"interactions:new"({interaction:t}){t.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer"({interaction:t}){return addTotal(t)},"interactions:before-action-start":e,"interactions:before-action-move":e,"interactions:before-action-end"({interaction:t}){if(applyPending(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop"({interaction:t}){t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}};export default f; | ||
//# sourceMappingURL=plugin.min.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
16449