@interactjs/offset
Advanced tools
Comparing version 1.10.23 to 1.10.24
{ | ||
"name": "@interactjs/offset", | ||
"version": "1.10.23", | ||
"version": "1.10.24", | ||
"main": "index", | ||
@@ -13,7 +13,7 @@ "module": "index", | ||
"peerDependencies": { | ||
"@interactjs/core": "1.10.23", | ||
"@interactjs/utils": "1.10.23" | ||
"@interactjs/core": "1.10.24", | ||
"@interactjs/utils": "1.10.24" | ||
}, | ||
"optionalDependencies": { | ||
"@interactjs/interact": "1.10.23" | ||
"@interactjs/interact": "1.10.24" | ||
}, | ||
@@ -28,3 +28,3 @@ "publishConfig": { | ||
"license": "MIT", | ||
"gitHead": "9ba48631" | ||
"gitHead": "86c64a3f" | ||
} |
@@ -9,3 +9,2 @@ import { _ProxyMethods } from "../core/Interaction.js"; | ||
} | ||
addToCoords(interaction.coords.cur, interaction.offset.total); | ||
@@ -15,3 +14,2 @@ interaction.offset.pending.x = 0; | ||
} | ||
function beforeAction({ | ||
@@ -22,3 +20,2 @@ interaction | ||
} | ||
function beforeEnd({ | ||
@@ -35,3 +32,2 @@ interaction | ||
} | ||
function end({ | ||
@@ -45,3 +41,2 @@ interaction | ||
} | ||
export function applyPending(interaction) { | ||
@@ -51,3 +46,2 @@ if (!hasPending(interaction)) { | ||
} | ||
const { | ||
@@ -63,3 +57,2 @@ pending | ||
} | ||
function offsetBy({ | ||
@@ -74,3 +67,2 @@ x, | ||
} | ||
function addToCoords({ | ||
@@ -88,15 +80,11 @@ page, | ||
} | ||
function hasPending(interaction) { | ||
return !!(interaction.offset.pending.x || interaction.offset.pending.y); | ||
} | ||
const offset = { | ||
id: 'offset', | ||
before: ['modifiers', 'pointer-events', 'actions', 'inertia'], | ||
install(scope) { | ||
scope.Interaction.prototype.offsetBy = offsetBy; | ||
}, | ||
listeners: { | ||
@@ -103,0 +91,0 @@ 'interactions:new': ({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
17021