@fulate/tools 1.0.2 → 1.0.5
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/dist/index.js +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -567,6 +567,12 @@ function sameTarget(left, right) {
|
|
|
567
567
|
function samePointScope(left, right) {
|
|
568
568
|
return left.kind === right.kind && (left.kind === "owner" || right.kind === "subpath" && left.subpathId === right.subpathId);
|
|
569
569
|
}
|
|
570
|
+
function resolveOriginPoint(bounds, x, y) {
|
|
571
|
+
return {
|
|
572
|
+
x: bounds.left + (resolveOrigin(x) + .5) * bounds.width,
|
|
573
|
+
y: bounds.top + (resolveOrigin(y) + .5) * bounds.height
|
|
574
|
+
};
|
|
575
|
+
}
|
|
570
576
|
var TransformGesture = class {
|
|
571
577
|
lastIntent;
|
|
572
578
|
previousRotationAngle;
|
|
@@ -1127,10 +1133,7 @@ var EditorInteractionController = class {
|
|
|
1127
1133
|
return {
|
|
1128
1134
|
kind: "custom-owner-local",
|
|
1129
1135
|
ownerKey: owner.key,
|
|
1130
|
-
local: preview ??
|
|
1131
|
-
x: bounds.left + (resolveOrigin(owner.rotationPivotX) + .5) * bounds.width,
|
|
1132
|
-
y: bounds.top + (resolveOrigin(owner.rotationPivotY) + .5) * bounds.height
|
|
1133
|
-
}
|
|
1136
|
+
local: preview ?? resolveOriginPoint(bounds, owner.rotationPivotX, owner.rotationPivotY)
|
|
1134
1137
|
};
|
|
1135
1138
|
}
|
|
1136
1139
|
return { kind: "selection-center" };
|
|
@@ -2132,10 +2135,7 @@ var EditorInteractionController = class {
|
|
|
2132
2135
|
const x = marker.horizontal;
|
|
2133
2136
|
const y = marker.vertical;
|
|
2134
2137
|
return {
|
|
2135
|
-
local:
|
|
2136
|
-
x: bounds.left + (resolveOrigin(x) + .5) * bounds.width,
|
|
2137
|
-
y: bounds.top + (resolveOrigin(y) + .5) * bounds.height
|
|
2138
|
-
},
|
|
2138
|
+
local: resolveOriginPoint(bounds, x, y),
|
|
2139
2139
|
x,
|
|
2140
2140
|
y,
|
|
2141
2141
|
markers
|