@aivex/ui 1.2.0-dev.30 → 1.2.0-dev.32
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/components/ShapeEditor/_model/props.d.ts +4 -3
- package/dist/components/ShapeEditor/_renderers/KonvaRenderer.d.ts +2 -0
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.ts +2 -0
- package/dist/shape-editor.cjs +1 -1
- package/dist/shape-editor.cjs.map +1 -1
- package/dist/shape-editor.js +23 -3
- package/dist/shape-editor.js.map +1 -1
- package/package.json +1 -1
package/dist/shape-editor.js
CHANGED
|
@@ -1850,7 +1850,7 @@ function vn(e) {
|
|
|
1850
1850
|
T().reset(), h.current([]), y.onPointerDown?.(ae(m, e, u, r));
|
|
1851
1851
|
return;
|
|
1852
1852
|
}
|
|
1853
|
-
if (d.current) {
|
|
1853
|
+
if (d.current && v !== q.SELECT) {
|
|
1854
1854
|
f();
|
|
1855
1855
|
return;
|
|
1856
1856
|
}
|
|
@@ -3930,7 +3930,7 @@ var Pr = 2, Fr = "#1e88e5", Ir = "#669def", Lr = class {
|
|
|
3930
3930
|
}), this.layer.batchDraw();
|
|
3931
3931
|
}
|
|
3932
3932
|
setTransformEnabled(e) {
|
|
3933
|
-
this.transformEnabled = e, this.drawTransformer(), this.layer.batchDraw();
|
|
3933
|
+
this.transformEnabled = e, e || this.cancelTransform(), this.drawTransformer(), this.layer.batchDraw();
|
|
3934
3934
|
}
|
|
3935
3935
|
setPanMode(e) {
|
|
3936
3936
|
this.handleGroup.listening(!e), this.layer.batchDraw();
|
|
@@ -4212,6 +4212,16 @@ var Pr = 2, Fr = "#1e88e5", Ir = "#669def", Lr = class {
|
|
|
4212
4212
|
}
|
|
4213
4213
|
this.layer.batchDraw();
|
|
4214
4214
|
}
|
|
4215
|
+
cancelTransform() {
|
|
4216
|
+
if (this.activeDrag) {
|
|
4217
|
+
this.activeDrag = null, this.lastDragImg = null;
|
|
4218
|
+
for (let e of this.shapes) this.liveUpdateShape(e.id, e.points);
|
|
4219
|
+
this.cb.onTransformPreview?.(this.shapes.map((e) => ({
|
|
4220
|
+
id: e.id,
|
|
4221
|
+
points: e.points
|
|
4222
|
+
}))), this.emitInteractionMode("idle"), this.emitCursorHint(null), this.drawSelectionBorders();
|
|
4223
|
+
}
|
|
4224
|
+
}
|
|
4215
4225
|
endTransform() {
|
|
4216
4226
|
let e = this.activeDrag, t = this.lastDragImg;
|
|
4217
4227
|
if (this.activeDrag = null, this.emitInteractionMode("idle"), this.emitCursorHint(e?.kind === "move" ? "grab" : null), !e || !t) {
|
|
@@ -4485,7 +4495,7 @@ var Hr = class {
|
|
|
4485
4495
|
t.size === this.selectedVertices.size && [...t].every((e) => this.selectedVertices.has(e)) || (this.selectedVertices = t, this.activeDrag || this.drawTransformer());
|
|
4486
4496
|
}
|
|
4487
4497
|
setTransformEnabled(e) {
|
|
4488
|
-
this.transformEnabled = e, this.syncShapeCursors(), this.drawTransformer();
|
|
4498
|
+
this.transformEnabled = e, e || this.cancelTransform(), this.syncShapeCursors(), this.drawTransformer();
|
|
4489
4499
|
}
|
|
4490
4500
|
setPanMode(e) {
|
|
4491
4501
|
this.handleLayer.interactiveChildren = !e;
|
|
@@ -5074,6 +5084,16 @@ var Hr = class {
|
|
|
5074
5084
|
this.repositionPolygonHandles(r[0].points, e?.type === L.POLYGON);
|
|
5075
5085
|
}
|
|
5076
5086
|
}
|
|
5087
|
+
cancelTransform() {
|
|
5088
|
+
if (!this.activeDrag) return;
|
|
5089
|
+
let e = this.activeDrag.kind === "move";
|
|
5090
|
+
this.activeDrag = null, this.lastDragImg = null, e && this.resetMoveOffsets();
|
|
5091
|
+
for (let e of this.shapes) this.liveUpdateShape(e.id, e.points);
|
|
5092
|
+
this.cb.onTransformPreview?.(this.shapes.map((e) => ({
|
|
5093
|
+
id: e.id,
|
|
5094
|
+
points: e.points
|
|
5095
|
+
}))), this.emitInteractionMode("idle"), this.emitCursorHint(null), this.drawSelectionBorders();
|
|
5096
|
+
}
|
|
5077
5097
|
endTransform() {
|
|
5078
5098
|
let e = this.activeDrag, t = this.lastDragImg;
|
|
5079
5099
|
if (this.activeDrag = null, this.emitInteractionMode("idle"), this.emitCursorHint(e?.kind === "move" ? "grab" : null), !e || !t) {
|