Socket
Socket
Sign inDemoInstall

@interactjs/offset

Package Overview
Dependencies
3
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.10.1 to 1.10.2

8

package.json
{
"name": "@interactjs/offset",
"version": "1.10.1",
"version": "1.10.2",
"license": "MIT",
"peerDependencies": {
"@interactjs/core": "1.10.1",
"@interactjs/utils": "1.10.1"
"@interactjs/core": "1.10.2",
"@interactjs/utils": "1.10.2"
},
"optionalDependencies": {
"@interactjs/interact": "1.10.1"
"@interactjs/interact": "1.10.2"
},

@@ -12,0 +12,0 @@ "publishConfig": {

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

import { _ProxyMethods } from "../core/Interaction.js";
import Interaction, { _ProxyMethods } from "../core/Interaction.js";
import * as rectUtils from "../utils/rect.js";

@@ -3,0 +3,0 @@ _ProxyMethods.offsetBy = '';

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

import{_ProxyMethods as t}from"../core/Interaction.prod.js";import*as e from"../utils/rect.prod.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 n({interaction:t}){applyPending(t)}export function applyPending(t){if(!(t=>!(!t.offset.pending.x&&!t.offset.pending.y))(t))return!1;const{pending:n}=t.offset;return i(t.coords.cur,n),i(t.coords.delta,n),e.addEdges(t.edges,t.rect,n),n.x=0,n.y=0,!0}function o({x:t,y:e}){this.offset.pending.x+=t,this.offset.pending.y+=e,this.offset.total.x+=t,this.offset.total.y+=e}function i({page:t,client:e},{x:n,y:o}){t.x+=n,t.y+=o,e.x+=n,e.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})=>addTotal(t),"interactions:before-action-start":n,"interactions:before-action-move":n,"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 t,{_ProxyMethods as e}from"../core/Interaction.prod.js";import*as n from"../utils/rect.prod.js";e.offsetBy="";export function addTotal(t){t.pointerIsDown&&(f(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}function o({interaction:t}){applyPending(t)}export function applyPending(t){if(!(t=>!(!t.offset.pending.x&&!t.offset.pending.y))(t))return!1;const{pending:e}=t.offset;return f(t.coords.cur,e),f(t.coords.delta,e),n.addEdges(t.edges,t.rect,e),e.x=0,e.y=0,!0}function i({x:t,y:e}){this.offset.pending.x+=t,this.offset.pending.y+=e,this.offset.total.x+=t,this.offset.total.y+=e}function f({page:t,client:e},{x:n,y:o}){t.x+=n,t.y+=o,e.x+=n,e.y+=o}const s={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install(t){t.Interaction.prototype.offsetBy=i},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":o,"interactions:before-action-move":o,"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 s;
//# sourceMappingURL=plugin.prod.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc