kritzel-stencil 0.0.121 → 0.0.122
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/cjs/{index-BjLSiQIM.js → index-CFCyVs0_.js} +185 -69
- package/dist/cjs/index-CFCyVs0_.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-brush-style_18.cjs.entry.js +127 -71
- package/dist/cjs/kritzel-brush-style_18.cjs.entry.js.map +1 -1
- package/dist/collection/classes/commands/remove-object.command.js +3 -0
- package/dist/collection/classes/commands/remove-object.command.js.map +1 -1
- package/dist/collection/classes/handlers/context-menu.handler.js +1 -1
- package/dist/collection/classes/handlers/context-menu.handler.js.map +1 -1
- package/dist/collection/classes/handlers/move.handler.js +2 -2
- package/dist/collection/classes/handlers/move.handler.js.map +1 -1
- package/dist/collection/classes/handlers/selection.handler.js +5 -5
- package/dist/collection/classes/handlers/selection.handler.js.map +1 -1
- package/dist/collection/classes/history.class.js +16 -13
- package/dist/collection/classes/history.class.js.map +1 -1
- package/dist/collection/classes/objects/base-object.class.js +28 -32
- package/dist/collection/classes/objects/base-object.class.js.map +1 -1
- package/dist/collection/classes/objects/custom-element.class.js +52 -0
- package/dist/collection/classes/objects/custom-element.class.js.map +1 -0
- package/dist/collection/classes/objects/image.class.js +1 -1
- package/dist/collection/classes/objects/image.class.js.map +1 -1
- package/dist/collection/classes/objects/path.class.js +62 -2
- package/dist/collection/classes/objects/path.class.js.map +1 -1
- package/dist/collection/classes/objects/selection-group.class.js +1 -1
- package/dist/collection/classes/objects/selection-group.class.js.map +1 -1
- package/dist/collection/classes/objects/text.class.js +1 -1
- package/dist/collection/classes/objects/text.class.js.map +1 -1
- package/dist/collection/classes/reviver.class.js +4 -0
- package/dist/collection/classes/reviver.class.js.map +1 -1
- package/dist/collection/classes/store.class.js +45 -6
- package/dist/collection/classes/store.class.js.map +1 -1
- package/dist/collection/classes/tools/eraser-tool.class.js +18 -14
- package/dist/collection/classes/tools/eraser-tool.class.js.map +1 -1
- package/dist/collection/classes/tools/image-tool.class.js +1 -1
- package/dist/collection/classes/tools/image-tool.class.js.map +1 -1
- package/dist/collection/classes/tools/selection-tool.class.js +2 -6
- package/dist/collection/classes/tools/selection-tool.class.js.map +1 -1
- package/dist/collection/classes/viewport.class.js +20 -12
- package/dist/collection/classes/viewport.class.js.map +1 -1
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +6 -6
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js.map +1 -1
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +38 -32
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js.map +1 -1
- package/dist/collection/configs/default-engine-state.js +2 -2
- package/dist/collection/configs/default-engine-state.js.map +1 -1
- package/dist/collection/helpers/html.helper.js +7 -0
- package/dist/collection/helpers/html.helper.js.map +1 -0
- package/dist/collection/helpers/object.helper.js +6 -2
- package/dist/collection/helpers/object.helper.js.map +1 -1
- package/dist/collection/interfaces/engine-state.interface.js.map +1 -1
- package/dist/collection/interfaces/object.interface.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-editor.js +7 -7
- package/dist/components/kritzel-editor.js.map +1 -1
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/{p-q-xqpmae.js → p-COPOzWCn.js} +211 -99
- package/dist/components/p-COPOzWCn.js.map +1 -0
- package/dist/components/{p-DC3j4P1n.js → p-Ch8eM2R8.js} +99 -39
- package/dist/components/p-Ch8eM2R8.js.map +1 -0
- package/dist/components/{p-BAMl2Ww6.js → p-DIu9OTyP.js} +3 -3
- package/dist/components/{p-BAMl2Ww6.js.map → p-DIu9OTyP.js.map} +1 -1
- package/dist/esm/{index-DsUDklEm.js → index-DYLW4hYm.js} +185 -69
- package/dist/esm/index-DYLW4hYm.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/kritzel-brush-style_18.entry.js +127 -71
- package/dist/esm/kritzel-brush-style_18.entry.js.map +1 -1
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/p-DYLW4hYm.js +2 -0
- package/dist/stencil/p-DYLW4hYm.js.map +1 -0
- package/dist/stencil/p-fa584641.entry.js +2 -0
- package/dist/stencil/p-fa584641.entry.js.map +1 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/history.class.d.ts +1 -0
- package/dist/types/classes/objects/base-object.class.d.ts +10 -6
- package/dist/types/classes/objects/custom-element.class.d.ts +26 -0
- package/dist/types/classes/objects/image.class.d.ts +1 -1
- package/dist/types/classes/objects/path.class.d.ts +5 -2
- package/dist/types/classes/objects/text.class.d.ts +1 -1
- package/dist/types/classes/store.class.d.ts +5 -0
- package/dist/types/components.d.ts +4 -4
- package/dist/types/helpers/html.helper.d.ts +3 -0
- package/dist/types/interfaces/engine-state.interface.d.ts +2 -2
- package/dist/types/interfaces/object.interface.d.ts +9 -4
- package/package.json +1 -1
- package/dist/cjs/index-BjLSiQIM.js.map +0 -1
- package/dist/components/p-DC3j4P1n.js.map +0 -1
- package/dist/components/p-q-xqpmae.js.map +0 -1
- package/dist/esm/index-DsUDklEm.js.map +0 -1
- package/dist/stencil/p-3797c300.entry.js +0 -2
- package/dist/stencil/p-3797c300.entry.js.map +0 -1
- package/dist/stencil/p-DsUDklEm.js +0 -2
- package/dist/stencil/p-DsUDklEm.js.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DEFAULT_BRUSH_CONFIG, e as DEFAULT_TEXT_CONFIG, K as KritzelBrushTool, d as KritzelEraserTool, s as KritzelImage, f as KritzelImageTool, r as KritzelPath, c as KritzelSelectionTool, q as KritzelText, a as KritzelTextTool } from './index-
|
|
1
|
+
export { D as DEFAULT_BRUSH_CONFIG, e as DEFAULT_TEXT_CONFIG, K as KritzelBrushTool, d as KritzelEraserTool, s as KritzelImage, f as KritzelImageTool, r as KritzelPath, c as KritzelSelectionTool, q as KritzelText, a as KritzelTextTool } from './index-DYLW4hYm.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-BPFXWTBp.js';
|
|
2
|
-
import { K as KritzelBrushTool, a as KritzelTextTool, b as KritzelMouseButton, c as KritzelSelectionTool, D as DEFAULT_BRUSH_CONFIG, d as KritzelEraserTool, e as DEFAULT_TEXT_CONFIG, f as KritzelImageTool, g as KritzelEventHelper, h as KritzelBaseCommand, i as KritzelSelectionGroup, j as KrtizelSelectionBox, R as RemoveSelectionGroupCommand, k as RemoveObjectCommand, B as BatchCommand, A as AddObjectCommand, l as AddSelectionGroupCommand, m as KritzelToolRegistry, n as KritzelBaseHandler, o as KritzelBaseTool, p as KritzelKeyboardHelper } from './index-
|
|
2
|
+
import { K as KritzelBrushTool, a as KritzelTextTool, b as KritzelMouseButton, c as KritzelSelectionTool, D as DEFAULT_BRUSH_CONFIG, d as KritzelEraserTool, e as DEFAULT_TEXT_CONFIG, f as KritzelImageTool, g as KritzelEventHelper, h as KritzelBaseCommand, i as KritzelSelectionGroup, j as KrtizelSelectionBox, R as RemoveSelectionGroupCommand, k as RemoveObjectCommand, B as BatchCommand, A as AddObjectCommand, l as AddSelectionGroupCommand, m as KritzelToolRegistry, n as KritzelBaseHandler, o as KritzelBaseTool, p as KritzelKeyboardHelper } from './index-DYLW4hYm.js';
|
|
3
3
|
|
|
4
4
|
const kritzelBrushStyleCss = ":host{display:flex;align-items:flex-start;gap:8px;padding:8px;box-sizing:border-box;width:100%}.brush-style-button{display:flex;justify-content:center;align-items:center;width:42px;height:32px;padding:0;border:none;outline:none;background:none;cursor:default;border-radius:0;color:var(--control-text-color);font-weight:bold;-webkit-tap-highlight-color:transparent}.font-style-button:not(:last-child){border-right:1px solid #333333}.font-style-button:hover{background-color:var(--control-hover-bg)}.font-style-button:active{background-color:var(--control-active-bg)}.font-style-button.selected,.font-style-button.selected:hover,.font-style-button.selected:active{background-color:var(--control-selected-bg);color:var(--control-selected-color)}";
|
|
5
5
|
|
|
@@ -661,8 +661,8 @@ const KritzelEditor = class {
|
|
|
661
661
|
name: 'brush',
|
|
662
662
|
type: 'tool',
|
|
663
663
|
tool: KritzelBrushTool,
|
|
664
|
-
isDefault: true,
|
|
665
664
|
icon: 'pen',
|
|
665
|
+
isDefault: true,
|
|
666
666
|
config: DEFAULT_BRUSH_CONFIG,
|
|
667
667
|
},
|
|
668
668
|
{
|
|
@@ -714,14 +714,14 @@ const KritzelEditor = class {
|
|
|
714
714
|
object.edit();
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
|
-
}
|
|
717
|
+
},
|
|
718
718
|
},
|
|
719
719
|
{ label: 'Copy', icon: 'copy', action: () => this.engineRef.copy() },
|
|
720
720
|
{
|
|
721
721
|
label: 'Paste',
|
|
722
722
|
icon: 'paste',
|
|
723
723
|
disabled: async () => (await this.engineRef.getCopiedObjects()).length === 0,
|
|
724
|
-
action: (menu, _) => this.engineRef.paste(menu.x, menu.y)
|
|
724
|
+
action: (menu, _) => this.engineRef.paste(menu.x, menu.y),
|
|
725
725
|
},
|
|
726
726
|
{ label: 'Delete', icon: 'delete', action: () => this.engineRef.delete() },
|
|
727
727
|
{ label: 'Bring to Front', icon: 'bring-to-front', action: () => this.engineRef.moveToTop() },
|
|
@@ -800,7 +800,7 @@ const KritzelEditor = class {
|
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
render() {
|
|
803
|
-
return (h(Host, { key: '
|
|
803
|
+
return (h(Host, { key: 'f2fa7efff5baf4df8a9b2100b96e1546731b006b' }, h("kritzel-engine", { key: 'd4fc5d1b0827656119b14c9e2971818904f41c3f', ref: el => (this.engineRef = el), onIsEngineReady: () => (this.isEngineReady = true), scaleMax: this.scaleMax, scaleMin: this.scaleMin, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems }), h("kritzel-controls", { key: 'd5f3a9b3d23090bbc8f36b8f974226697868988d', ref: el => (this.controlsRef = el), controls: this.controls, isUtilityPanelVisible: this.isUtilityPanelVisible, style: this.isControlsVisible ? { display: 'flex' } : { display: 'none' }, onIsControlsReady: () => (this.isControlsReady = true) })));
|
|
804
804
|
}
|
|
805
805
|
get host() { return getElement(this); }
|
|
806
806
|
static get watchers() { return {
|
|
@@ -858,21 +858,27 @@ class KritzelViewport {
|
|
|
858
858
|
}
|
|
859
859
|
handlePointerMove(event) {
|
|
860
860
|
if (event.pointerType === 'mouse') {
|
|
861
|
-
const
|
|
862
|
-
const
|
|
863
|
-
|
|
864
|
-
this._store.state.
|
|
861
|
+
const hostRect = this._store.state.host.getBoundingClientRect();
|
|
862
|
+
const xRelativeToHost = event.clientX - hostRect.left;
|
|
863
|
+
const yRelativeToHost = event.clientY - hostRect.top;
|
|
864
|
+
this._store.state.pointerX = (xRelativeToHost - this._store.state.translateX) / this._store.state.scale;
|
|
865
|
+
this._store.state.pointerY = (yRelativeToHost - this._store.state.translateY) / this._store.state.scale;
|
|
865
866
|
if (this._store.state.isPanning) {
|
|
866
|
-
this._store.state.translateX -= this._store.state.startX -
|
|
867
|
-
this._store.state.translateY -= this._store.state.startY -
|
|
868
|
-
this._store.state.startX =
|
|
869
|
-
this._store.state.startY =
|
|
867
|
+
this._store.state.translateX -= this._store.state.startX - xRelativeToHost;
|
|
868
|
+
this._store.state.translateY -= this._store.state.startY - yRelativeToHost;
|
|
869
|
+
this._store.state.startX = xRelativeToHost;
|
|
870
|
+
this._store.state.startY = yRelativeToHost;
|
|
870
871
|
this._store.state.hasViewportChanged = true;
|
|
871
872
|
this._store.state.skipContextMenu = true;
|
|
872
873
|
this._store.rerender();
|
|
873
874
|
}
|
|
874
875
|
}
|
|
875
876
|
if (event.pointerType === 'touch') {
|
|
877
|
+
const hostRect = this._store.state.host.getBoundingClientRect();
|
|
878
|
+
const xRelativeToHost = event.clientX - hostRect.left;
|
|
879
|
+
const yRelativeToHost = event.clientY - hostRect.top;
|
|
880
|
+
this._store.state.pointerX = (xRelativeToHost - this._store.state.translateX) / this._store.state.scale;
|
|
881
|
+
this._store.state.pointerY = (yRelativeToHost - this._store.state.translateY) / this._store.state.scale;
|
|
876
882
|
const activePointers = Array.from(this._store.state.pointers.values());
|
|
877
883
|
if (activePointers.length === 2) {
|
|
878
884
|
const firstTouchX = activePointers[0].clientX - this._store.offsetX;
|
|
@@ -926,13 +932,15 @@ class KritzelViewport {
|
|
|
926
932
|
}
|
|
927
933
|
handleZoom(event) {
|
|
928
934
|
const rect = this._store.state.host.getBoundingClientRect();
|
|
929
|
-
|
|
930
|
-
|
|
935
|
+
const xRelativeToHost = event.clientX - rect.left;
|
|
936
|
+
const yRelativeToHost = event.clientY - rect.top;
|
|
937
|
+
this._store.state.pointerX = (xRelativeToHost - this._store.state.translateX) / this._store.state.scale;
|
|
938
|
+
this._store.state.pointerY = (yRelativeToHost - this._store.state.translateY) / this._store.state.scale;
|
|
931
939
|
const delta = event.deltaY > 0 ? -this._store.state.scaleStep * this._store.state.scale : this._store.state.scaleStep * this._store.state.scale;
|
|
932
940
|
const newScale = Math.min(this._store.state.scaleMax, Math.max(this._store.state.scaleMin, this._store.state.scale + delta));
|
|
933
941
|
const scaleRatio = newScale / this._store.state.scale;
|
|
934
|
-
const translateXAdjustment = (
|
|
935
|
-
const translateYAdjustment = (
|
|
942
|
+
const translateXAdjustment = (xRelativeToHost - this._store.state.translateX) * (scaleRatio - 1);
|
|
943
|
+
const translateYAdjustment = (yRelativeToHost - this._store.state.translateY) * (scaleRatio - 1);
|
|
936
944
|
this._store.state.scale = newScale;
|
|
937
945
|
this._store.state.translateX -= translateXAdjustment;
|
|
938
946
|
this._store.state.translateY -= translateYAdjustment;
|
|
@@ -1030,19 +1038,7 @@ class KritzelHistory {
|
|
|
1030
1038
|
}
|
|
1031
1039
|
executeCommand(command) {
|
|
1032
1040
|
if (this._store.state.hasViewportChanged) {
|
|
1033
|
-
|
|
1034
|
-
command.execute();
|
|
1035
|
-
this.undoStack.add(command);
|
|
1036
|
-
if (this.redoStack.isEmpty() === false) {
|
|
1037
|
-
this.redoStack.clear();
|
|
1038
|
-
}
|
|
1039
|
-
this._store.state.hasViewportChanged = false;
|
|
1040
|
-
this.previousViewport = {
|
|
1041
|
-
scale: this._store.state.scale,
|
|
1042
|
-
scaleStep: this._store.state.scaleStep,
|
|
1043
|
-
translateX: this._store.state.translateX,
|
|
1044
|
-
translateY: this._store.state.translateY,
|
|
1045
|
-
};
|
|
1041
|
+
this.addUpdateViewportCommand();
|
|
1046
1042
|
}
|
|
1047
1043
|
command.execute();
|
|
1048
1044
|
if (this._store.state.debugInfo.logCommands)
|
|
@@ -1080,6 +1076,21 @@ class KritzelHistory {
|
|
|
1080
1076
|
}
|
|
1081
1077
|
this._store.rerender();
|
|
1082
1078
|
}
|
|
1079
|
+
addUpdateViewportCommand() {
|
|
1080
|
+
const command = new UpdateViewportCommand(this._store, this, this.previousViewport);
|
|
1081
|
+
command.execute();
|
|
1082
|
+
this.undoStack.add(command);
|
|
1083
|
+
if (this.redoStack.isEmpty() === false) {
|
|
1084
|
+
this.redoStack.clear();
|
|
1085
|
+
}
|
|
1086
|
+
this._store.state.hasViewportChanged = false;
|
|
1087
|
+
this.previousViewport = {
|
|
1088
|
+
scale: this._store.state.scale,
|
|
1089
|
+
scaleStep: this._store.state.scaleStep,
|
|
1090
|
+
translateX: this._store.state.translateX,
|
|
1091
|
+
translateY: this._store.state.translateY,
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1083
1094
|
}
|
|
1084
1095
|
|
|
1085
1096
|
class KritzelOctree {
|
|
@@ -1257,8 +1268,8 @@ const DEFAULT_ENGINE_STATE = {
|
|
|
1257
1268
|
logCommands: false,
|
|
1258
1269
|
},
|
|
1259
1270
|
host: null,
|
|
1260
|
-
|
|
1261
|
-
|
|
1271
|
+
pointerX: 0,
|
|
1272
|
+
pointerY: 0,
|
|
1262
1273
|
scale: 1,
|
|
1263
1274
|
scaleMax: 1,
|
|
1264
1275
|
scaleMin: 1,
|
|
@@ -1293,7 +1304,7 @@ class KritzelStore {
|
|
|
1293
1304
|
return this._state.objectsOctree.allObjects();
|
|
1294
1305
|
}
|
|
1295
1306
|
get selectedObjects() {
|
|
1296
|
-
return this.allObjects.filter(o => !(o instanceof KritzelSelectionGroup)).filter(o => o.
|
|
1307
|
+
return this.allObjects.filter(o => !(o instanceof KritzelSelectionGroup)).filter(o => o.isSelected);
|
|
1297
1308
|
}
|
|
1298
1309
|
get offsetX() {
|
|
1299
1310
|
return this._state.host.getBoundingClientRect().left;
|
|
@@ -1384,7 +1395,7 @@ class KritzelStore {
|
|
|
1384
1395
|
this.state.copiedObjects = this.state.selectionGroup.copy();
|
|
1385
1396
|
}
|
|
1386
1397
|
paste(x, y) {
|
|
1387
|
-
this.state.copiedObjects.
|
|
1398
|
+
this.state.copiedObjects.isSelected = true;
|
|
1388
1399
|
const adjustedX = x !== undefined ? x : this.state.copiedObjects.translateX + 25;
|
|
1389
1400
|
const adjustedY = y !== undefined ? y : this.state.copiedObjects.translateY + 25;
|
|
1390
1401
|
this.state.copiedObjects.updatePosition(adjustedX, adjustedY);
|
|
@@ -1444,10 +1455,10 @@ class KritzelStore {
|
|
|
1444
1455
|
}
|
|
1445
1456
|
const selectionGroup = KritzelSelectionGroup.create(this);
|
|
1446
1457
|
objects.forEach(obj => {
|
|
1447
|
-
obj.
|
|
1458
|
+
obj.isSelected = false;
|
|
1448
1459
|
selectionGroup.addOrRemove(obj);
|
|
1449
1460
|
});
|
|
1450
|
-
selectionGroup.
|
|
1461
|
+
selectionGroup.isSelected = true;
|
|
1451
1462
|
this.state.selectionGroup = selectionGroup;
|
|
1452
1463
|
if (objects.length === 1) {
|
|
1453
1464
|
selectionGroup.rotation = selectionGroup.objects[0].rotation;
|
|
@@ -1468,10 +1479,10 @@ class KritzelStore {
|
|
|
1468
1479
|
if (objectsInViewport.length > 0) {
|
|
1469
1480
|
const selectionGroup = KritzelSelectionGroup.create(this);
|
|
1470
1481
|
objectsInViewport.forEach(obj => {
|
|
1471
|
-
obj.
|
|
1482
|
+
obj.isSelected = false;
|
|
1472
1483
|
selectionGroup.addOrRemove(obj);
|
|
1473
1484
|
});
|
|
1474
|
-
selectionGroup.
|
|
1485
|
+
selectionGroup.isSelected = true;
|
|
1475
1486
|
this.state.isSelecting = false;
|
|
1476
1487
|
if (objectsInViewport.length === 1) {
|
|
1477
1488
|
selectionGroup.rotation = selectionGroup.objects[0].rotation;
|
|
@@ -1512,6 +1523,45 @@ class KritzelStore {
|
|
|
1512
1523
|
}
|
|
1513
1524
|
return null;
|
|
1514
1525
|
}
|
|
1526
|
+
getObjectsFromPointerEvent(event, selector = '.object') {
|
|
1527
|
+
var _a;
|
|
1528
|
+
const shadowRoot = (_a = this.state.host) === null || _a === void 0 ? void 0 : _a.shadowRoot;
|
|
1529
|
+
if (!shadowRoot)
|
|
1530
|
+
return [];
|
|
1531
|
+
const clientX = event.clientX;
|
|
1532
|
+
const clientY = event.clientY;
|
|
1533
|
+
const elementsAtPoint = shadowRoot.elementsFromPoint(clientX, clientY);
|
|
1534
|
+
if (!elementsAtPoint || elementsAtPoint.length === 0)
|
|
1535
|
+
return [];
|
|
1536
|
+
const objectIds = new Set();
|
|
1537
|
+
elementsAtPoint.forEach(element => {
|
|
1538
|
+
const selectedObject = element.closest(selector);
|
|
1539
|
+
if (selectedObject && selectedObject.id) {
|
|
1540
|
+
objectIds.add(selectedObject.id);
|
|
1541
|
+
}
|
|
1542
|
+
});
|
|
1543
|
+
if (objectIds.size > 0) {
|
|
1544
|
+
return this.allObjects.filter(object => objectIds.has(object.id)).sort((a, b) => b.zIndex - a.zIndex);
|
|
1545
|
+
}
|
|
1546
|
+
return [];
|
|
1547
|
+
}
|
|
1548
|
+
getCanvasPoint(event) {
|
|
1549
|
+
if (!this.state.host) {
|
|
1550
|
+
return { x: 0, y: 0 };
|
|
1551
|
+
}
|
|
1552
|
+
// Get the position of the kritzel-engine host element relative to the viewport
|
|
1553
|
+
const hostRect = this.state.host.getBoundingClientRect();
|
|
1554
|
+
// 1. Make the pointer coordinates relative to the host element
|
|
1555
|
+
const xRelativeToHost = event.clientX - hostRect.left;
|
|
1556
|
+
const yRelativeToHost = event.clientY - hostRect.top;
|
|
1557
|
+
// 2. Reverse the translation applied to the #origin div
|
|
1558
|
+
const xWithoutTranslate = xRelativeToHost - this.state.translateX;
|
|
1559
|
+
const yWithoutTranslate = yRelativeToHost - this.state.translateY;
|
|
1560
|
+
// 3. Reverse the scaling to get the final world coordinates
|
|
1561
|
+
const worldX = xWithoutTranslate / this.state.scale;
|
|
1562
|
+
const worldY = yWithoutTranslate / this.state.scale;
|
|
1563
|
+
return { x: worldX, y: worldY };
|
|
1564
|
+
}
|
|
1515
1565
|
}
|
|
1516
1566
|
|
|
1517
1567
|
class KritzelKeyHandler extends KritzelBaseHandler {
|
|
@@ -1610,7 +1660,7 @@ class KritzelContextMenuHandler extends KritzelBaseHandler {
|
|
|
1610
1660
|
if (selectedObject && !(selectedObject instanceof KritzelSelectionGroup)) {
|
|
1611
1661
|
this._store.state.selectionGroup = KritzelSelectionGroup.create(this._store);
|
|
1612
1662
|
this._store.state.selectionGroup.addOrRemove(selectedObject);
|
|
1613
|
-
this._store.state.selectionGroup.
|
|
1663
|
+
this._store.state.selectionGroup.isSelected = true;
|
|
1614
1664
|
this._store.state.selectionGroup.rotation = selectedObject.rotation;
|
|
1615
1665
|
this._store.state.isSelecting = false;
|
|
1616
1666
|
this._store.history.executeCommand(new AddSelectionGroupCommand(this._store, this, this._store.state.selectionGroup));
|
|
@@ -1925,15 +1975,15 @@ const KritzelEngine = class {
|
|
|
1925
1975
|
const baseHandleSizePx = computedStyle.getPropertyValue('--kritzel-selection-handle-size').trim() || '6px';
|
|
1926
1976
|
const baseHandleSize = parseFloat(baseHandleSizePx);
|
|
1927
1977
|
const baseHandleTouchSize = baseHandleSize * 2 < 14 ? 14 : baseHandleSize;
|
|
1928
|
-
return (h(Host, { key: '
|
|
1929
|
-
_a.translateX), h("div", { key: '
|
|
1930
|
-
_b.translateY), h("div", { key: '
|
|
1931
|
-
_c.viewportWidth), h("div", { key: '
|
|
1932
|
-
_d.viewportHeight), h("div", { key: '
|
|
1933
|
-
_e.scale), h("div", { key: '
|
|
1934
|
-
_g.name), h("div", { key: '
|
|
1935
|
-
_m.
|
|
1936
|
-
_o.
|
|
1978
|
+
return (h(Host, { key: 'a8e6c284c98509ddd158686887d656d3907d40a2' }, h("div", { key: '3935b658e8859f746a5faef0bb91a527b68fcd3e', class: "debug-panel", style: { display: this.store.state.debugInfo.showViewportInfo ? 'block' : 'none' } }, h("div", { key: '12c190c7ea99ac69310b27e719e7df8392b2b46e' }, "TranslateX: ", (_a = this.store.state) === null || _a === void 0 ? void 0 :
|
|
1979
|
+
_a.translateX), h("div", { key: '4c98deccc2a029dab06ed76e5af426f4a05c7b66' }, "TranslateY: ", (_b = this.store.state) === null || _b === void 0 ? void 0 :
|
|
1980
|
+
_b.translateY), h("div", { key: '1330191a39c7795f17a6adcc4fbd05e2d6a24d43' }, "ViewportWidth: ", (_c = this.store.state) === null || _c === void 0 ? void 0 :
|
|
1981
|
+
_c.viewportWidth), h("div", { key: '1ee59427037357ee6bf746a094285426eb0e6a58' }, "ViewportHeight: ", (_d = this.store.state) === null || _d === void 0 ? void 0 :
|
|
1982
|
+
_d.viewportHeight), h("div", { key: '1e68312e8516f25dcff34e9f9f70b90f426b8711' }, "ObjectsInViewport. ", this.store.objects.length), h("div", { key: '1d7cea9e21d9b744d8eaac29286528829143b4fa' }, "Scale: ", (_e = this.store.state) === null || _e === void 0 ? void 0 :
|
|
1983
|
+
_e.scale), h("div", { key: '0b60168fbd55aefa3714067bace80f167b8bcac0' }, "ActiveTool: ", (_g = (_f = this.store.state) === null || _f === void 0 ? void 0 : _f.activeTool) === null || _g === void 0 ? void 0 :
|
|
1984
|
+
_g.name), h("div", { key: '109752df6a77633d89929f325d296f96d27d7aa9' }, "HasViewportChanged: ", ((_h = this.store.state) === null || _h === void 0 ? void 0 : _h.hasViewportChanged) ? 'true' : 'false'), h("div", { key: 'b35466caf465b490c5d448d694353186ff902f09' }, "IsEnabled: ", ((_j = this.store.state) === null || _j === void 0 ? void 0 : _j.isEnabled) ? 'true' : 'false'), h("div", { key: '5df20e47f3bf234f04eea001b0a0abaf57946498' }, "IsScaling: ", ((_k = this.store.state) === null || _k === void 0 ? void 0 : _k.isScaling) ? 'true' : 'false'), h("div", { key: '9d1ec8b8268488821a968e109fa279393977fdf8' }, "IsPanning: ", ((_l = this.store.state) === null || _l === void 0 ? void 0 : _l.isPanning) ? 'true' : 'false'), h("div", { key: '92fa98b7fa3bf877c4fffaca70683d2d908f5177' }, "IsFocused: ", this.store.state.isFocused ? 'true' : 'false'), h("div", { key: '708d02459c1e3907dd88a2f2fd8916c1ee684cf1' }, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), h("div", { key: '27f45c1b6ee0b6bd0b3301a9c09b9198de722ac4' }, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), h("div", { key: '50d4476aecfc00d12bae7d8a3880ccb8de82fe68' }, "IsResizeHandleSelected: ", this.store.state.isResizeHandleSelected ? 'true' : 'false'), h("div", { key: '0c582e97ee1535b4a14b75b7ef15373c43f21c4b' }, "IsRotationHandleSelected: ", this.store.state.isRotationHandleSelected ? 'true' : 'false'), h("div", { key: '7a8378ac991d17d0eaaba5fbd519875197903a39' }, "IsDrawing: ", this.store.state.isDrawing ? 'true' : 'false'), h("div", { key: '00b56f11ffd16f7b9049d2857f5f7effceba1294' }, "IsWriting: ", this.store.state.isWriting ? 'true' : 'false'), h("div", { key: '3b7773194bd6bc8b8b2d024afc768f4e9fbb54c6' }, "PointerX: ", (_m = this.store.state) === null || _m === void 0 ? void 0 :
|
|
1985
|
+
_m.pointerX), h("div", { key: 'a2b2c96f6180591082a5aee20cc3e82236dac520' }, "PointerY: ", (_o = this.store.state) === null || _o === void 0 ? void 0 :
|
|
1986
|
+
_o.pointerY)), h("div", { key: '309eb61fff5182b5076cb3886bbd79006efc30b1', id: "origin", class: "origin", style: {
|
|
1937
1987
|
transform: `matrix(${(_p = this.store.state) === null || _p === void 0 ? void 0 : _p.scale}, 0, 0, ${(_q = this.store.state) === null || _q === void 0 ? void 0 : _q.scale}, ${(_r = this.store.state) === null || _r === void 0 ? void 0 : _r.translateX}, ${(_s = this.store.state) === null || _s === void 0 ? void 0 : _s.translateY})`,
|
|
1938
1988
|
} }, (_t = this.store.objects) === null || _t === void 0 ? void 0 :
|
|
1939
1989
|
_t.map(object => {
|
|
@@ -1957,17 +2007,17 @@ const KritzelEngine = class {
|
|
|
1957
2007
|
borderStyle: 'solid',
|
|
1958
2008
|
padding: object.padding + 'px',
|
|
1959
2009
|
overflow: 'visible',
|
|
1960
|
-
} }, KritzelClassHelper.isInstanceOf(object, 'KritzelPath') && (h("svg", { ref: el => object.mount(el), xmlns: "http://www.w3.org/2000/svg", style: {
|
|
2010
|
+
} }, KritzelClassHelper.isInstanceOf(object, 'KritzelPath') && (h("svg", { ref: el => el ? object.mount(el) : object.unmount(), xmlns: "http://www.w3.org/2000/svg", style: {
|
|
1961
2011
|
height: object === null || object === void 0 ? void 0 : object.height.toString(),
|
|
1962
2012
|
width: object === null || object === void 0 ? void 0 : object.width.toString(),
|
|
1963
2013
|
position: 'absolute',
|
|
1964
2014
|
overflow: 'visible',
|
|
1965
|
-
}, viewBox: object === null || object === void 0 ? void 0 : object.viewBox }, h("path", { d: object === null || object === void 0 ? void 0 : object.d, fill: object.fill, stroke: object === null || object === void 0 ? void 0 : object.stroke }))), KritzelClassHelper.isInstanceOf(object, 'KritzelImage') && (h("img", { ref: el => object.mount(el), src: object.src, style: {
|
|
2015
|
+
}, viewBox: object === null || object === void 0 ? void 0 : object.viewBox }, h("path", { d: object === null || object === void 0 ? void 0 : object.d, fill: object.fill, stroke: object === null || object === void 0 ? void 0 : object.stroke }))), KritzelClassHelper.isInstanceOf(object, 'KritzelImage') && (h("img", { ref: el => el ? object.mount(el) : object.unmount(), src: object.src, style: {
|
|
1966
2016
|
width: '100%',
|
|
1967
2017
|
height: '100%',
|
|
1968
2018
|
userSelect: 'none',
|
|
1969
2019
|
pointerEvents: 'none',
|
|
1970
|
-
}, draggable: false, onDragStart: e => e.preventDefault() })), KritzelClassHelper.isInstanceOf(object, 'KritzelText') && (h("textarea", { ref: el => object.mount(el), value: object.value, onKeyDown: event => object.handleKeyDown(event), onInput: event => object.handleInput(event), rows: object.rows, style: {
|
|
2020
|
+
}, draggable: false, onDragStart: e => e.preventDefault() })), KritzelClassHelper.isInstanceOf(object, 'KritzelText') && (h("textarea", { ref: el => el ? object.mount(el) : object.unmount(), value: object.value, onKeyDown: event => object.handleKeyDown(event), onInput: event => object.handleInput(event), rows: object.rows, style: {
|
|
1971
2021
|
width: '100%',
|
|
1972
2022
|
height: '100%',
|
|
1973
2023
|
color: object.fontColor,
|
|
@@ -1983,54 +2033,60 @@ const KritzelEngine = class {
|
|
|
1983
2033
|
pointerEvents: object.isReadonly ? 'none' : 'auto',
|
|
1984
2034
|
cursor: object.isReadonly ? 'default' : 'text',
|
|
1985
2035
|
caretColor: object.isReadonly ? 'transparent' : 'auto',
|
|
1986
|
-
} })), KritzelClassHelper.isInstanceOf(object, '
|
|
2036
|
+
} })), KritzelClassHelper.isInstanceOf(object, 'KritzelCustomElement') && (h("div", { ref: el => el ? object.mount(el) : object.unmount(), style: {
|
|
2037
|
+
width: '100%',
|
|
2038
|
+
height: '100%',
|
|
2039
|
+
pointerEvents: 'auto',
|
|
2040
|
+
overflow: 'hidden',
|
|
2041
|
+
display: 'block',
|
|
2042
|
+
} })), KritzelClassHelper.isInstanceOf(object, 'KritzelSelectionGroup') && (h("div", { ref: el => el ? object.mount(el) : object.unmount(), style: {
|
|
1987
2043
|
width: '100%',
|
|
1988
2044
|
height: '100%',
|
|
1989
|
-
} })), KritzelClassHelper.isInstanceOf(object, 'KrtizelSelectionBox') && (h("div", { ref: el => object.mount(el), style: {
|
|
2045
|
+
} })), KritzelClassHelper.isInstanceOf(object, 'KrtizelSelectionBox') && (h("div", { ref: el => el ? object.mount(el) : object.unmount(), style: {
|
|
1990
2046
|
width: '100%',
|
|
1991
2047
|
height: '100%',
|
|
1992
2048
|
} }))), h("line", { x1: "0", y1: "0", x2: object.totalWidth, y2: "0", style: {
|
|
1993
2049
|
stroke: 'var(--kritzel-selection-border-color, #0e1111)',
|
|
1994
2050
|
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${(_b = this.store.state) === null || _b === void 0 ? void 0 : _b.scale})`,
|
|
1995
2051
|
strokeLinecap: 'square',
|
|
1996
|
-
}, visibility: object.
|
|
2052
|
+
}, visibility: object.isSelected ? 'visible' : 'hidden' }), h("line", { x1: "0", y1: "0", x2: "0", y2: object.totalHeight, style: {
|
|
1997
2053
|
stroke: 'var(--kritzel-selection-border-color, #0e1111)',
|
|
1998
2054
|
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${(_c = this.store.state) === null || _c === void 0 ? void 0 : _c.scale})`,
|
|
1999
2055
|
strokeLinecap: 'square',
|
|
2000
|
-
}, visibility: object.
|
|
2056
|
+
}, visibility: object.isSelected ? 'visible' : 'hidden' }), h("line", { x1: "0", y1: object.totalHeight, x2: object.totalWidth, y2: object.totalHeight, style: {
|
|
2001
2057
|
stroke: 'var(--kritzel-selection-border-color, #0e1111)',
|
|
2002
2058
|
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${(_d = this.store.state) === null || _d === void 0 ? void 0 : _d.scale})`,
|
|
2003
2059
|
strokeLinecap: 'square',
|
|
2004
|
-
}, visibility: object.
|
|
2060
|
+
}, visibility: object.isSelected ? 'visible' : 'hidden' }), h("line", { x1: object.totalWidth, y1: "0", x2: object.totalWidth, y2: object.totalHeight, style: {
|
|
2005
2061
|
stroke: 'var(--kritzel-selection-border-color, #0e1111)',
|
|
2006
2062
|
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${(_e = this.store.state) === null || _e === void 0 ? void 0 : _e.scale})`,
|
|
2007
2063
|
strokeLinecap: 'square',
|
|
2008
|
-
}, visibility: object.
|
|
2064
|
+
}, visibility: object.isSelected ? 'visible' : 'hidden' }), h("circle", { class: "resize-handle top-left", cx: "0", cy: "0", r: `${(baseHandleSize * object.scale) / ((_f = this.store.state) === null || _f === void 0 ? void 0 : _f.scale)}`, style: {
|
|
2009
2065
|
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
2010
|
-
}, visibility: object.
|
|
2066
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "resize-handle-overlay top-left", cx: "0", cy: "0", r: `${(baseHandleTouchSize * object.scale) / ((_g = this.store.state) === null || _g === void 0 ? void 0 : _g.scale)}`, style: {
|
|
2011
2067
|
fill: 'transparent',
|
|
2012
|
-
}, visibility: object.
|
|
2068
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "resize-handle top-right", cx: object.totalWidth, cy: "0", r: `${(baseHandleSize * object.scale) / ((_h = this.store.state) === null || _h === void 0 ? void 0 : _h.scale)}`, style: {
|
|
2013
2069
|
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
2014
|
-
}, visibility: object.
|
|
2070
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "resize-handle-overlay top-right", cx: object.totalWidth, cy: "0", r: `${(baseHandleTouchSize * object.scale) / ((_j = this.store.state) === null || _j === void 0 ? void 0 : _j.scale)}`, style: {
|
|
2015
2071
|
fill: 'transparent',
|
|
2016
|
-
}, visibility: object.
|
|
2072
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "resize-handle bottom-left", cx: "0", cy: object.totalHeight, r: `${(baseHandleSize * object.scale) / ((_k = this.store.state) === null || _k === void 0 ? void 0 : _k.scale)}`, style: {
|
|
2017
2073
|
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
2018
|
-
}, visibility: object.
|
|
2074
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "resize-handle-overlay bottom-left", cx: "0", cy: object.totalHeight, r: `${(baseHandleTouchSize * object.scale) / ((_l = this.store.state) === null || _l === void 0 ? void 0 : _l.scale)}`, style: {
|
|
2019
2075
|
fill: 'transparent',
|
|
2020
|
-
}, visibility: object.
|
|
2076
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "resize-handle bottom-right", cx: object.totalWidth, cy: object.totalHeight, r: `${(baseHandleSize * object.scale) / ((_m = this.store.state) === null || _m === void 0 ? void 0 : _m.scale)}`, style: {
|
|
2021
2077
|
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
2022
|
-
}, visibility: object.
|
|
2078
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "resize-handle-overlay bottom-right", cx: object.totalWidth, cy: object.totalHeight, r: `${(baseHandleTouchSize * object.scale) / ((_o = this.store.state) === null || _o === void 0 ? void 0 : _o.scale)}`, style: {
|
|
2023
2079
|
fill: 'transparent',
|
|
2024
|
-
}, visibility: object.
|
|
2080
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("line", { x1: object.totalWidth / 2, y1: "0", x2: object.totalWidth / 2, y2: -((15 * object.scale) / ((_p = this.store.state) === null || _p === void 0 ? void 0 : _p.scale)), style: {
|
|
2025
2081
|
stroke: 'var(--kritzel-selection-border-color, #0e1111)',
|
|
2026
2082
|
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${(_q = this.store.state) === null || _q === void 0 ? void 0 : _q.scale})`,
|
|
2027
|
-
}, visibility: object.
|
|
2083
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "rotation-handle", cx: object.totalWidth / 2, cy: -((15 * object.scale) / ((_r = this.store.state) === null || _r === void 0 ? void 0 : _r.scale)), r: `${(baseHandleSize * object.scale) / ((_s = this.store.state) === null || _s === void 0 ? void 0 : _s.scale)}`, style: {
|
|
2028
2084
|
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
2029
|
-
}, visibility: object.
|
|
2085
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("circle", { class: "rotation-handle-overlay", cx: object.totalWidth / 2, cy: -((15 * object.scale) / ((_t = this.store.state) === null || _t === void 0 ? void 0 : _t.scale)), r: `${(baseHandleTouchSize * object.scale) / ((_u = this.store.state) === null || _u === void 0 ? void 0 : _u.scale)}`, style: {
|
|
2030
2086
|
fill: 'transparent',
|
|
2031
2087
|
cursor: 'grab',
|
|
2032
|
-
}, visibility: object.
|
|
2033
|
-
}), h("svg", { key: '
|
|
2088
|
+
}, visibility: object.isSelected && !this.isSelecting ? 'visible' : 'hidden' }), h("g", { style: { display: this.store.state.debugInfo.showObjectInfo ? 'block' : 'none', pointerEvents: 'none' } }, h("foreignObject", { x: object.totalWidth.toString(), y: "0", width: "400px", height: "160px", style: { minHeight: '0', minWidth: '0', display: object.isDebugInfoVisible ? 'block' : 'none' } }, h("div", { style: { width: '100%', height: '100%' } }, h("div", { style: { whiteSpace: 'nowrap' } }, "zIndex: ", object.zIndex), h("div", { style: { whiteSpace: 'nowrap' } }, "translateX: ", object.translateX), h("div", { style: { whiteSpace: 'nowrap' } }, "translateY: ", object.translateY), h("div", { style: { whiteSpace: 'nowrap' } }, "width: ", object.width), h("div", { style: { whiteSpace: 'nowrap' } }, "height: ", object.height), h("div", { style: { whiteSpace: 'nowrap' } }, "scale: ", object.scale), h("div", { style: { whiteSpace: 'nowrap' } }, "rotation: ", object.rotation)))))));
|
|
2089
|
+
}), h("svg", { key: '2bd19129a4d4d8334273c221aaa039c562240883', class: "object", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
2034
2090
|
height: (_u = this.store.state.currentPath) === null || _u === void 0 ? void 0 : _u.height.toString(),
|
|
2035
2091
|
width: (_v = this.store.state.currentPath) === null || _v === void 0 ? void 0 : _v.width.toString(),
|
|
2036
2092
|
left: '0',
|
|
@@ -2040,7 +2096,7 @@ const KritzelEngine = class {
|
|
|
2040
2096
|
transform: (_x = this.store.state.currentPath) === null || _x === void 0 ? void 0 : _x.transformationMatrix,
|
|
2041
2097
|
transformOrigin: 'top left',
|
|
2042
2098
|
overflow: 'visible',
|
|
2043
|
-
}, viewBox: (_y = this.store.state.currentPath) === null || _y === void 0 ? void 0 : _y.viewBox }, h("path", { key: '
|
|
2099
|
+
}, viewBox: (_y = this.store.state.currentPath) === null || _y === void 0 ? void 0 : _y.viewBox }, h("path", { key: '327c40e8bd4f838172808fb6ffc6a4f7971ebd63', d: (_z = this.store.state.currentPath) === null || _z === void 0 ? void 0 : _z.d, fill: (_0 = this.store.state.currentPath) === null || _0 === void 0 ? void 0 : _0.fill, stroke: (_1 = this.store.state.currentPath) === null || _1 === void 0 ? void 0 : _1.stroke }))), this.store.state.isContextMenuVisible && (h("kritzel-context-menu", { key: '933c55feabc4ae7ac13dffab763c931763e88a7f', class: "context-menu", ref: el => (this.contextMenuElement = el), items: this.store.state.contextMenuItems, objects: ((_2 = this.store.state.selectionGroup) === null || _2 === void 0 ? void 0 : _2.objects) || [], style: {
|
|
2044
2100
|
position: 'fixed',
|
|
2045
2101
|
left: `${this.store.state.contextMenuX}px`,
|
|
2046
2102
|
top: `${this.store.state.contextMenuY}px`,
|
|
@@ -2052,7 +2108,7 @@ const KritzelEngine = class {
|
|
|
2052
2108
|
y: (-this.store.state.translateY + this.store.state.contextMenuY) / this.store.state.scale,
|
|
2053
2109
|
}, (_a = this.store.state.selectionGroup) === null || _a === void 0 ? void 0 : _a.objects);
|
|
2054
2110
|
this.hideContextMenu();
|
|
2055
|
-
} })), ((_3 = this.store.state) === null || _3 === void 0 ? void 0 : _3.activeTool) instanceof KritzelEraserTool && !this.store.state.isScaling && h("kritzel-cursor-trail", { key: '
|
|
2111
|
+
} })), ((_3 = this.store.state) === null || _3 === void 0 ? void 0 : _3.activeTool) instanceof KritzelEraserTool && !this.store.state.isScaling && h("kritzel-cursor-trail", { key: '0fa1c51dd63156d26b21b9b443c471cf2014351c', store: this.store })));
|
|
2056
2112
|
}
|
|
2057
2113
|
get host() { return getElement(this); }
|
|
2058
2114
|
static get watchers() { return {
|