kritzel-stencil 0.0.136 → 0.0.138
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-CVu--fM6.js → index-CYkadfjX.js} +9 -10
- package/dist/cjs/index-CYkadfjX.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-color_22.cjs.entry.js +2 -1
- package/dist/collection/classes/core/core.class.js +1 -0
- package/dist/collection/classes/core/core.class.js.map +1 -1
- package/dist/collection/classes/handlers/move.handler.js +1 -1
- package/dist/collection/classes/handlers/move.handler.js.map +1 -1
- package/dist/collection/classes/handlers/rotation.handler.js +1 -0
- package/dist/collection/classes/handlers/rotation.handler.js.map +1 -1
- package/dist/collection/classes/handlers/selection.handler.js +4 -5
- package/dist/collection/classes/handlers/selection.handler.js.map +1 -1
- package/dist/collection/classes/objects/text.class.js +1 -2
- package/dist/collection/classes/objects/text.class.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 +3 -3
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/{p-BdSbO-K6.js → p-D554MPA9.js} +10 -9
- package/dist/components/p-D554MPA9.js.map +1 -0
- package/dist/components/{p-obTL5Wl7.js → p-Di5CEwzQ.js} +3 -4
- package/dist/components/p-Di5CEwzQ.js.map +1 -0
- package/dist/components/{p-RKMcsakE.js → p-PvCKCYuw.js} +3 -3
- package/dist/components/{p-RKMcsakE.js.map → p-PvCKCYuw.js.map} +1 -1
- package/dist/esm/{index-445xFXAf.js → index-IhpPa9g4.js} +9 -10
- package/dist/esm/index-IhpPa9g4.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/kritzel-color_22.entry.js +2 -1
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/{p-7e666d4b.entry.js → p-32ac435d.entry.js} +2 -2
- package/dist/stencil/{p-7e666d4b.entry.js.map → p-32ac435d.entry.js.map} +1 -1
- package/dist/stencil/p-IhpPa9g4.js +2 -0
- package/dist/stencil/p-IhpPa9g4.js.map +1 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-CVu--fM6.js.map +0 -1
- package/dist/components/p-BdSbO-K6.js.map +0 -1
- package/dist/components/p-obTL5Wl7.js.map +0 -1
- package/dist/esm/index-445xFXAf.js.map +0 -1
- package/dist/stencil/p-445xFXAf.js +0 -2
- package/dist/stencil/p-445xFXAf.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelControls$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelControls$1, d as defineCustomElement$1 } from './p-PvCKCYuw.js';
|
|
2
2
|
|
|
3
3
|
const KritzelControls = KritzelControls$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-BYanlgdq.js';
|
|
2
2
|
import { a as KritzelIconRegistry, d as defineCustomElement$a } from './p-sq9jgfX0.js';
|
|
3
|
-
import { A as ABSOLUTE_SCALE_MAX, f as ABSOLUTE_SCALE_MIN, c as KritzelSelectionTool, a as KritzelEraserTool, b as KritzelImageTool, e as defineCustomElement$e } from './p-
|
|
4
|
-
import { b as KritzelBrushTool, c as KritzelTextTool, d as KritzelKeyboardHelper } from './p-
|
|
3
|
+
import { A as ABSOLUTE_SCALE_MAX, f as ABSOLUTE_SCALE_MIN, c as KritzelSelectionTool, a as KritzelEraserTool, b as KritzelImageTool, e as defineCustomElement$e } from './p-D554MPA9.js';
|
|
4
|
+
import { b as KritzelBrushTool, c as KritzelTextTool, d as KritzelKeyboardHelper } from './p-Di5CEwzQ.js';
|
|
5
5
|
import { K as KritzelWorkspace } from './p-YqK8ch2R.js';
|
|
6
6
|
import { K as KritzelDevicesHelper } from './p-l10It7Nm.js';
|
|
7
7
|
import { d as defineCustomElement$m } from './p-B7kZ1_RH.js';
|
|
@@ -9,7 +9,7 @@ import { d as defineCustomElement$l } from './p-CsyM5q2M.js';
|
|
|
9
9
|
import { d as defineCustomElement$k } from './p-DOPuq6gn.js';
|
|
10
10
|
import { d as defineCustomElement$j } from './p-B7w19kIk.js';
|
|
11
11
|
import { d as defineCustomElement$i } from './p-DjU7p3od.js';
|
|
12
|
-
import { d as defineCustomElement$h } from './p-
|
|
12
|
+
import { d as defineCustomElement$h } from './p-PvCKCYuw.js';
|
|
13
13
|
import { d as defineCustomElement$g } from './p-Db3kxVe2.js';
|
|
14
14
|
import { d as defineCustomElement$f } from './p-DFO-6kuA.js';
|
|
15
15
|
import { d as defineCustomElement$d } from './p-BM9IjvnD.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-BYanlgdq.js';
|
|
2
2
|
import { K as KritzelMouseButton } from './p-D8W6LE-c.js';
|
|
3
|
-
import { e as KritzelBaseObject, f as KritzelBaseCommand, g as KritzelBaseTool, h as KritzelEventHelper, c as KritzelTextTool, b as KritzelBrushTool, K as KritzelText, a as KritzelPath, A as AddObjectCommand, i as KritzelToolRegistry, U as UpdateObjectCommand, d as KritzelKeyboardHelper } from './p-
|
|
3
|
+
import { e as KritzelBaseObject, f as KritzelBaseCommand, g as KritzelBaseTool, h as KritzelEventHelper, c as KritzelTextTool, b as KritzelBrushTool, K as KritzelText, a as KritzelPath, A as AddObjectCommand, i as KritzelToolRegistry, U as UpdateObjectCommand, d as KritzelKeyboardHelper } from './p-Di5CEwzQ.js';
|
|
4
4
|
import { K as KritzelWorkspace } from './p-YqK8ch2R.js';
|
|
5
5
|
import { K as KritzelContextMenu, d as defineCustomElement$3 } from './p-DOPuq6gn.js';
|
|
6
6
|
import { O as ObjectHelper } from './p-B0kd2rUI.js';
|
|
@@ -367,7 +367,6 @@ class KritzelMoveHandler extends KritzelBaseHandler {
|
|
|
367
367
|
this._core.store.setState('isDragging', true);
|
|
368
368
|
this.endX = x;
|
|
369
369
|
this.endY = y;
|
|
370
|
-
this.hasMoved = true;
|
|
371
370
|
const moveDeltaX = Math.abs(x - this.startX);
|
|
372
371
|
const moveDeltaY = Math.abs(y - this.startY);
|
|
373
372
|
const moveThreshold = 5;
|
|
@@ -376,6 +375,7 @@ class KritzelMoveHandler extends KritzelBaseHandler {
|
|
|
376
375
|
this._core.store.state.selectionGroup.move(x, y, this.dragStartX, this.dragStartY);
|
|
377
376
|
this.dragStartX = x;
|
|
378
377
|
this.dragStartY = y;
|
|
378
|
+
this.hasMoved = true;
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
}
|
|
@@ -660,6 +660,7 @@ class KritzelRotationHandler extends KritzelBaseHandler {
|
|
|
660
660
|
const centerY = this._core.store.state.selectionGroup.translateY + this._core.store.state.selectionGroup.height / 2 / this._core.store.state.scale;
|
|
661
661
|
const cursorX = (clientX - this._core.store.state.translateX) / this._core.store.state.scale;
|
|
662
662
|
const cursorY = (clientY - this._core.store.state.translateY) / this._core.store.state.scale;
|
|
663
|
+
this.initialSelectionGroupRotation = this._core.store.state.selectionGroup.rotation;
|
|
663
664
|
this.initialRotation = Math.atan2(centerY - cursorY, centerX - cursorX) - this._core.store.state.selectionGroup.rotation;
|
|
664
665
|
this.unchangedObjects = this._core.store.state.selectionGroup.objects.map(obj => obj.clone());
|
|
665
666
|
clearTimeout(this._core.store.state.longTouchTimeout);
|
|
@@ -931,12 +932,12 @@ class KritzelSelectionHandler extends KritzelBaseHandler {
|
|
|
931
932
|
if (!object) {
|
|
932
933
|
return;
|
|
933
934
|
}
|
|
935
|
+
object.isSelected = false;
|
|
934
936
|
const selectionGroup = KritzelSelectionGroup.create(this._core);
|
|
935
937
|
selectionGroup.addOrRemove(object);
|
|
936
938
|
selectionGroup.isSelected = true;
|
|
937
939
|
selectionGroup.rotation = object.rotation;
|
|
938
|
-
this._core.
|
|
939
|
-
this._core.history.executeCommand(new AddSelectionGroupCommand(this._core, this, this._core.store.state.selectionGroup));
|
|
940
|
+
this._core.history.executeCommand(new AddSelectionGroupCommand(this._core, this, selectionGroup));
|
|
940
941
|
}
|
|
941
942
|
addSelectedObjectsToSelectionGroup() {
|
|
942
943
|
const selectedObjects = this._core.store.selectedObjects;
|
|
@@ -945,16 +946,15 @@ class KritzelSelectionHandler extends KritzelBaseHandler {
|
|
|
945
946
|
}
|
|
946
947
|
this._core.store.setState('selectionGroup', KritzelSelectionGroup.create(this._core));
|
|
947
948
|
selectedObjects.forEach(o => {
|
|
948
|
-
o.isSelected = false;
|
|
949
949
|
this._core.store.state.selectionGroup.addOrRemove(o);
|
|
950
|
+
o.isSelected = false;
|
|
950
951
|
});
|
|
951
952
|
const selectionGroup = this._core.store.state.selectionGroup;
|
|
952
953
|
selectionGroup.isSelected = true;
|
|
953
954
|
if (selectionGroup.length === 1) {
|
|
954
955
|
selectionGroup.rotation = selectionGroup.objects[0].rotation;
|
|
955
956
|
}
|
|
956
|
-
this._core.
|
|
957
|
-
this._core.history.executeCommand(new AddSelectionGroupCommand(this._core, this, this._core.store.state.selectionGroup));
|
|
957
|
+
this._core.history.executeCommand(new AddSelectionGroupCommand(this._core, this, selectionGroup));
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
960
|
|
|
@@ -2555,6 +2555,7 @@ class KritzelCore {
|
|
|
2555
2555
|
this._store.setState('isSelecting', false);
|
|
2556
2556
|
this._store.setState('isResizeHandleSelected', false);
|
|
2557
2557
|
this._store.setState('isRotationHandleSelected', false);
|
|
2558
|
+
this.rerender();
|
|
2558
2559
|
}
|
|
2559
2560
|
resetActiveText() {
|
|
2560
2561
|
if (this._store.state.activeText && this._store.state.activeText.value === ' ') {
|
|
@@ -3132,6 +3133,6 @@ function defineCustomElement() {
|
|
|
3132
3133
|
}
|
|
3133
3134
|
|
|
3134
3135
|
export { ABSOLUTE_SCALE_MAX as A, KritzelImage as K, KritzelEraserTool as a, KritzelImageTool as b, KritzelSelectionTool as c, KritzelEngine as d, defineCustomElement as e, ABSOLUTE_SCALE_MIN as f };
|
|
3135
|
-
//# sourceMappingURL=p-
|
|
3136
|
+
//# sourceMappingURL=p-D554MPA9.js.map
|
|
3136
3137
|
|
|
3137
|
-
//# sourceMappingURL=p-
|
|
3138
|
+
//# sourceMappingURL=p-D554MPA9.js.map
|