@leafer-ui/core 1.9.6 → 1.9.8
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/lib/core.cjs +3 -3
- package/lib/core.esm.js +3 -3
- package/lib/core.esm.min.js.map +1 -1
- package/lib/core.min.cjs.map +1 -1
- package/package.json +6 -6
package/lib/core.cjs
CHANGED
|
@@ -266,9 +266,9 @@ exports.DragEvent = class DragEvent extends exports.PointerEvent {
|
|
|
266
266
|
static setData(data) {
|
|
267
267
|
this.data = data;
|
|
268
268
|
}
|
|
269
|
-
static getValidMove(leaf,
|
|
270
|
-
const move = leaf.getLocalPoint(
|
|
271
|
-
core.PointHelper.move(move,
|
|
269
|
+
static getValidMove(leaf, localStart, worldTotal, checkLimit = true) {
|
|
270
|
+
const move = leaf.getLocalPoint(worldTotal, null, true);
|
|
271
|
+
core.PointHelper.move(move, localStart.x - leaf.x, localStart.y - leaf.y);
|
|
272
272
|
if (checkLimit) this.limitMove(leaf, move);
|
|
273
273
|
draw.DragBoundsHelper.axisMove(leaf, move);
|
|
274
274
|
return move;
|
package/lib/core.esm.js
CHANGED
|
@@ -266,9 +266,9 @@ let DragEvent = class DragEvent extends PointerEvent {
|
|
|
266
266
|
static setData(data) {
|
|
267
267
|
this.data = data;
|
|
268
268
|
}
|
|
269
|
-
static getValidMove(leaf,
|
|
270
|
-
const move = leaf.getLocalPoint(
|
|
271
|
-
PointHelper.move(move,
|
|
269
|
+
static getValidMove(leaf, localStart, worldTotal, checkLimit = true) {
|
|
270
|
+
const move = leaf.getLocalPoint(worldTotal, null, true);
|
|
271
|
+
PointHelper.move(move, localStart.x - leaf.x, localStart.y - leaf.y);
|
|
272
272
|
if (checkLimit) this.limitMove(leaf, move);
|
|
273
273
|
DragBoundsHelper.axisMove(leaf, move);
|
|
274
274
|
return move;
|