zydx-plus 1.35.509 → 1.35.511
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -261,7 +261,9 @@ export default {
|
|
|
261
261
|
that.dragTap()
|
|
262
262
|
},
|
|
263
263
|
move (event) {
|
|
264
|
-
|
|
264
|
+
// 获取滚动距离
|
|
265
|
+
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
266
|
+
that.y = event.rect.top - scrollTop
|
|
265
267
|
that.x = event.rect.left
|
|
266
268
|
if (that.x < -that.footRightOffset / 2) {
|
|
267
269
|
that.x = -that.footRightOffset / 2
|
|
@@ -300,7 +302,7 @@ export default {
|
|
|
300
302
|
if (this.direction === 'd') {
|
|
301
303
|
this.footDownOffset = event.clientY - this.y;
|
|
302
304
|
} else if (this.direction === 'in') {
|
|
303
|
-
this.footDownOffset = event.
|
|
305
|
+
this.footDownOffset = event.clientY - this.y;
|
|
304
306
|
this.footRightOffset = event.clientX - this.x;
|
|
305
307
|
} else if (this.direction === 'r') {
|
|
306
308
|
this.footRightOffset = event.clientX - this.x;
|
|
@@ -267,7 +267,9 @@ export default {
|
|
|
267
267
|
interact(`#draggable${that.id}`).draggable({
|
|
268
268
|
listeners: {
|
|
269
269
|
move (event) {
|
|
270
|
-
|
|
270
|
+
// 获取滚动距离
|
|
271
|
+
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
272
|
+
that.y = event.rect.top - scrollTop
|
|
271
273
|
that.x = event.rect.left
|
|
272
274
|
if (that.x < -that.footRightOffset / 2) {
|
|
273
275
|
that.x = -that.footRightOffset / 2
|
|
@@ -306,7 +308,7 @@ export default {
|
|
|
306
308
|
if (this.direction === 'd') {
|
|
307
309
|
this.footDownOffset = event.clientY - this.y;
|
|
308
310
|
} else if (this.direction === 'in') {
|
|
309
|
-
this.footDownOffset = event.
|
|
311
|
+
this.footDownOffset = event.clientY - this.y;
|
|
310
312
|
this.footRightOffset = event.clientX - this.x;
|
|
311
313
|
} else if (this.direction === 'r') {
|
|
312
314
|
this.footRightOffset = event.clientX - this.x;
|