@interactjs/offset
Advanced tools
Comparing version 1.9.2 to 1.9.3
@@ -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",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})=>addTotal(t),"interactions:before-action-start":e,"interactions:before-action-move":e,"interactions:before-action-end":function({interaction:t}){if(applyPending(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function({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",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=index.min.js.map |
{ | ||
"name": "@interactjs/offset", | ||
"version": "1.9.2", | ||
"version": "1.9.3", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@interactjs/core": "1.9.2", | ||
"@interactjs/utils": "1.9.2" | ||
"@interactjs/core": "1.9.3", | ||
"@interactjs/utils": "1.9.3" | ||
}, | ||
"optionalDependencies": { | ||
"@interactjs/interact": "1.9.2" | ||
"@interactjs/interact": "1.9.3" | ||
}, | ||
@@ -15,3 +15,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "77b581be" | ||
"gitHead": "2032dde4" | ||
} |
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
16564