Skip to content

Commit f7640c7

Browse files
committed
Tidy code a little in pointerUp
1 parent c247db2 commit f7640c7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

interact.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,7 +2726,7 @@
27262726

27272727
if (inertiaStatus.active) { return; }
27282728

2729-
var deltaSource =target.options.deltaSource,
2729+
var deltaSource = options.deltaSource,
27302730
pointerSpeed = pointerDelta[deltaSource + 'Speed'],
27312731
now = new Date().getTime(),
27322732
inertiaPossible = false,
@@ -2737,7 +2737,7 @@
27372737
startEvent;
27382738

27392739
// check if inertia should be started
2740-
inertiaPossible = (target.options.inertiaEnabled
2740+
inertiaPossible = (options.inertiaEnabled
27412741
&& prepared !== 'gesture'
27422742
&& indexOf(inertiaOptions.actions, prepared) !== -1
27432743
&& event !== inertiaStatus.startEvent);
@@ -2819,8 +2819,8 @@
28192819

28202820
dx = dy = 0;
28212821

2822-
if (target.options.snapEnabled && target.options.snap.endOnly
2823-
&& indexOf(target.options.snap.actions, prepared) !== -1) {
2822+
if (options.snapEnabled && options.snap.endOnly
2823+
&& indexOf(options.snap.actions, prepared) !== -1) {
28242824

28252825
var snap = setSnapping(event, statusObject);
28262826

@@ -2830,7 +2830,7 @@
28302830
}
28312831
}
28322832

2833-
if (target.options.restrictEnabled && target.options.restrict.endOnly) {
2833+
if (options.restrictEnabled && options.restrict.endOnly) {
28342834
var restrict = setRestriction(event, statusObject);
28352835

28362836
if (restrict.restricted) {
@@ -2858,8 +2858,8 @@
28582858
return;
28592859
}
28602860

2861-
if ((target.options.snapEnabled && target.options.snap.endOnly)
2862-
|| (target.options.restrictEnabled && target.options.restrict.endOnly)) {
2861+
if ((options.snapEnabled && options.snap.endOnly)
2862+
|| (options.restrictEnabled && options.restrict.endOnly)) {
28632863
// fire a move event at the snapped coordinates
28642864
pointerMove(event, true);
28652865
}

0 commit comments

Comments
 (0)