@anu3ev/fabric-image-editor 0.8.24 → 0.8.26
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/main.js +73 -21
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -7,14 +7,28 @@ var E = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", D =
|
|
|
7
7
|
return t;
|
|
8
8
|
}, O = 300, k = class t {
|
|
9
9
|
constructor({ editor: e, options: n = {} }) {
|
|
10
|
-
this.isDragging = !1, this.lastMouseX = 0, this.lastMouseY = 0, this.isUndoRedoKeyPressed = !1, this.isSpacePressed = !1, this.savedSelection = [], this.canvasDragging = !1, this.mouseWheelZooming = !1, this.resetObjectFitByDoubleClick = !1, this.copyObjectsByHotkey = !1, this.pasteImageFromClipboard = !1, this.undoRedoByHotKeys = !1, this.selectAllByHotkey = !1, this.deleteObjectsByHotkey = !1, this.adaptCanvasToContainerOnResize = !1, this.editor = e, this.canvas = e.canvas, this.options = n, this.handleContainerResizeBound = t.debounce(this.handleContainerResize.bind(this), 500), this.handleCopyEventBound = this.handleCopyEvent.bind(this), this.handlePasteEventBound = this.handlePasteEvent.bind(this), this.handleUndoRedoEventBound = this.handleUndoRedoEvent.bind(this), this.handleUndoRedoKeyUpBound = this.handleUndoRedoKeyUp.bind(this), this.handleSelectAllEventBound = this.handleSelectAllEvent.bind(this), this.handleDeleteObjectsEventBound = this.handleDeleteObjectsEvent.bind(this), this.handleSpaceKeyDownBound = this.handleSpaceKeyDown.bind(this), this.handleSpaceKeyUpBound = this.handleSpaceKeyUp.bind(this), this.handleObjectModifiedHistoryBound = this.handleObjectModifiedHistory.bind(this), this.handleObjectRotatingHistoryBound = this.handleObjectRotatingHistory.bind(this), this.handleObjectTransformStartBound = this.handleObjectTransformStart.bind(this), this.handleObjectTransformEndBound = this.handleObjectTransformEnd.bind(this), this.handleObjectAddedHistoryBound = this.handleObjectAddedHistory.bind(this), this.handleObjectRemovedHistoryBound = this.handleObjectRemovedHistory.bind(this), this.handleOverlayUpdateBound = this.handleOverlayUpdate.bind(this), this.handleBackgroundUpdateBound = this.handleBackgroundUpdate.bind(this), this.handleCanvasDragStartBound = this.handleCanvasDragStart.bind(this), this.handleCanvasDraggingBound = this.handleCanvasDragging.bind(this), this.handleCanvasDragEndBound = this.handleCanvasDragEnd.bind(this), this.handleCanvasWheelZoomBound = this.handleCanvasWheelZoom.bind(this), this.handleResetObjectFitBound = this.handleResetObjectFit.bind(this), this.init();
|
|
10
|
+
this.isDragging = !1, this.lastMouseX = 0, this.lastMouseY = 0, this.isUndoRedoKeyPressed = !1, this.isSpacePressed = !1, this.savedSelection = [], this.canvasDragging = !1, this.mouseWheelZooming = !1, this.resetObjectFitByDoubleClick = !1, this.copyObjectsByHotkey = !1, this.cutObjectsByHotkey = !1, this.duplicateObjectsByHotkey = !1, this.pasteImageFromClipboard = !1, this.undoRedoByHotKeys = !1, this.selectAllByHotkey = !1, this.deleteObjectsByHotkey = !1, this.adaptCanvasToContainerOnResize = !1, this.editor = e, this.canvas = e.canvas, this.options = n, this.handleContainerResizeBound = t.debounce(this.handleContainerResize.bind(this), 500), this.handleCopyEventBound = this.handleCopyEvent.bind(this), this.handleCutEventBound = this.handleCutEvent.bind(this), this.handleDuplicateEventBound = this.handleDuplicateEvent.bind(this), this.handlePasteEventBound = this.handlePasteEvent.bind(this), this.handleUndoRedoEventBound = this.handleUndoRedoEvent.bind(this), this.handleUndoRedoKeyUpBound = this.handleUndoRedoKeyUp.bind(this), this.handleSelectAllEventBound = this.handleSelectAllEvent.bind(this), this.handleDeleteObjectsEventBound = this.handleDeleteObjectsEvent.bind(this), this.handleSpaceKeyDownBound = this.handleSpaceKeyDown.bind(this), this.handleSpaceKeyUpBound = this.handleSpaceKeyUp.bind(this), this.handleObjectModifiedHistoryBound = this.handleObjectModifiedHistory.bind(this), this.handleObjectRotatingHistoryBound = this.handleObjectRotatingHistory.bind(this), this.handleObjectTransformStartBound = this.handleObjectTransformStart.bind(this), this.handleObjectTransformEndBound = this.handleObjectTransformEnd.bind(this), this.handleObjectAddedHistoryBound = this.handleObjectAddedHistory.bind(this), this.handleObjectRemovedHistoryBound = this.handleObjectRemovedHistory.bind(this), this.handleOverlayUpdateBound = this.handleOverlayUpdate.bind(this), this.handleBackgroundUpdateBound = this.handleBackgroundUpdate.bind(this), this.handleCanvasDragStartBound = this.handleCanvasDragStart.bind(this), this.handleCanvasDraggingBound = this.handleCanvasDragging.bind(this), this.handleCanvasDragEndBound = this.handleCanvasDragEnd.bind(this), this.handleCanvasWheelZoomBound = this.handleCanvasWheelZoom.bind(this), this.handleResetObjectFitBound = this.handleResetObjectFit.bind(this), this.init();
|
|
11
11
|
}
|
|
12
12
|
init() {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
this._bindCanvasInteractionEvents(), this._bindDomEvents(), this._bindHistoryEvents(), this._bindOverlayEvents(), this._bindBackgroundEvents();
|
|
14
|
+
}
|
|
15
|
+
_bindCanvasInteractionEvents() {
|
|
16
|
+
this.options.canvasDragging && (this.canvas.on("mouse:down", this.handleCanvasDragStartBound), this.canvas.on("mouse:move", this.handleCanvasDraggingBound), this.canvas.on("mouse:up", this.handleCanvasDragEndBound), document.addEventListener("keydown", this.handleSpaceKeyDownBound, { capture: !0 }), document.addEventListener("keyup", this.handleSpaceKeyUpBound, { capture: !0 })), this.options.mouseWheelZooming && this.canvas.wrapperEl.addEventListener("wheel", this.handleCanvasWheelZoomBound, {
|
|
15
17
|
capture: !0,
|
|
16
18
|
passive: !1
|
|
17
|
-
}),
|
|
19
|
+
}), this.options.resetObjectFitByDoubleClick && this.canvas.on("mouse:dblclick", this.handleResetObjectFitBound);
|
|
20
|
+
}
|
|
21
|
+
_bindDomEvents() {
|
|
22
|
+
this.options.adaptCanvasToContainerOnResize && window.addEventListener("resize", this.handleContainerResizeBound, { capture: !0 }), this.options.copyObjectsByHotkey && document.addEventListener("keydown", this.handleCopyEventBound, { capture: !0 }), this.options.cutObjectsByHotkey && document.addEventListener("keydown", this.handleCutEventBound, { capture: !0 }), this.options.duplicateObjectsByHotkey && document.addEventListener("keydown", this.handleDuplicateEventBound, { capture: !0 }), this.options.pasteImageFromClipboard && document.addEventListener("paste", this.handlePasteEventBound, { capture: !0 }), this.options.undoRedoByHotKeys && (document.addEventListener("keydown", this.handleUndoRedoEventBound, { capture: !0 }), document.addEventListener("keyup", this.handleUndoRedoKeyUpBound, { capture: !0 })), this.options.selectAllByHotkey && document.addEventListener("keydown", this.handleSelectAllEventBound, { capture: !0 }), this.options.deleteObjectsByHotkey && document.addEventListener("keydown", this.handleDeleteObjectsEventBound, { capture: !0 });
|
|
23
|
+
}
|
|
24
|
+
_bindHistoryEvents() {
|
|
25
|
+
this.canvas.on("object:modified", this.handleObjectModifiedHistoryBound), this.canvas.on("object:rotating", this.handleObjectRotatingHistoryBound), this.canvas.on("object:added", this.handleObjectAddedHistoryBound), this.canvas.on("object:removed", this.handleObjectRemovedHistoryBound), this.canvas.on("object:moving", this.handleObjectTransformStartBound), this.canvas.on("object:scaling", this.handleObjectTransformStartBound), this.canvas.on("object:rotating", this.handleObjectTransformStartBound), this.canvas.on("object:skewing", this.handleObjectTransformStartBound), this.canvas.on("object:resizing", this.handleObjectTransformStartBound), this.canvas.on("object:modified", this.handleObjectTransformEndBound);
|
|
26
|
+
}
|
|
27
|
+
_bindOverlayEvents() {
|
|
28
|
+
this.canvas.on("object:added", this.handleOverlayUpdateBound), this.canvas.on("selection:created", this.handleOverlayUpdateBound);
|
|
29
|
+
}
|
|
30
|
+
_bindBackgroundEvents() {
|
|
31
|
+
this.canvas.on("object:added", this.handleBackgroundUpdateBound), this.canvas.on("selection:created", this.handleBackgroundUpdateBound);
|
|
18
32
|
}
|
|
19
33
|
handleObjectModifiedHistory({ target: e } = {}) {
|
|
20
34
|
let { historyManager: t, textManager: n } = this.editor, r = e;
|
|
@@ -60,6 +74,14 @@ var E = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", D =
|
|
|
60
74
|
let { ctrlKey: t, metaKey: n, code: r } = e;
|
|
61
75
|
this._shouldIgnoreKeyboardEvent(e) || !t && !n || r !== "KeyC" || (e.preventDefault(), this.editor.clipboardManager.copy());
|
|
62
76
|
}
|
|
77
|
+
handleCutEvent(e) {
|
|
78
|
+
let { ctrlKey: t, metaKey: n, code: r } = e;
|
|
79
|
+
this._shouldIgnoreKeyboardEvent(e) || !t && !n || r !== "KeyX" || (e.preventDefault(), this.editor.clipboardManager.cut());
|
|
80
|
+
}
|
|
81
|
+
handleDuplicateEvent(e) {
|
|
82
|
+
let { ctrlKey: t, metaKey: n, code: r } = e;
|
|
83
|
+
this._shouldIgnoreKeyboardEvent(e) || !t && !n || r !== "KeyD" || (e.preventDefault(), this.editor.clipboardManager.copyPaste());
|
|
84
|
+
}
|
|
63
85
|
handlePasteEvent(e) {
|
|
64
86
|
this._shouldIgnoreKeyboardEvent(e) || this.editor.clipboardManager.handlePasteEvent(e);
|
|
65
87
|
}
|
|
@@ -195,7 +217,7 @@ var E = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", D =
|
|
|
195
217
|
return !1;
|
|
196
218
|
}
|
|
197
219
|
destroy() {
|
|
198
|
-
window.removeEventListener("resize", this.handleContainerResizeBound, { capture: !0 }), document.removeEventListener("keydown", this.handleCopyEventBound, { capture: !0 }), document.removeEventListener("paste", this.handlePasteEventBound, { capture: !0 }), document.removeEventListener("keydown", this.handleUndoRedoEventBound, { capture: !0 }), document.removeEventListener("keyup", this.handleUndoRedoKeyUpBound, { capture: !0 }), document.removeEventListener("keydown", this.handleSelectAllEventBound, { capture: !0 }), document.removeEventListener("keydown", this.handleDeleteObjectsEventBound, { capture: !0 }), this.options.canvasDragging && (this.canvas.off("mouse:down", this.handleCanvasDragStartBound), this.canvas.off("mouse:move", this.handleCanvasDraggingBound), this.canvas.off("mouse:up", this.handleCanvasDragEndBound), document.removeEventListener("keydown", this.handleSpaceKeyDownBound, { capture: !0 }), document.removeEventListener("keyup", this.handleSpaceKeyUpBound, { capture: !0 })), this.options.mouseWheelZooming && this.canvas.wrapperEl.removeEventListener("wheel", this.handleCanvasWheelZoomBound, { capture: !0 }), this.options.resetObjectFitByDoubleClick && this.canvas.off("mouse:dblclick", this.handleResetObjectFitBound), this.canvas.off("object:modified", this.handleObjectModifiedHistoryBound), this.canvas.off("object:rotating", this.handleObjectRotatingHistoryBound), this.canvas.off("object:added", this.handleObjectAddedHistoryBound), this.canvas.off("object:removed", this.handleObjectRemovedHistoryBound), this.canvas.off("object:moving", this.handleObjectTransformStartBound), this.canvas.off("object:scaling", this.handleObjectTransformStartBound), this.canvas.off("object:rotating", this.handleObjectTransformStartBound), this.canvas.off("object:skewing", this.handleObjectTransformStartBound), this.canvas.off("object:resizing", this.handleObjectTransformStartBound), this.canvas.off("object:modified", this.handleObjectTransformEndBound), this.canvas.off("object:added", this.handleOverlayUpdateBound), this.canvas.off("selection:created", this.handleOverlayUpdateBound), this.canvas.off("object:added", this.handleBackgroundUpdateBound), this.canvas.off("selection:created", this.handleBackgroundUpdateBound);
|
|
220
|
+
window.removeEventListener("resize", this.handleContainerResizeBound, { capture: !0 }), document.removeEventListener("keydown", this.handleCopyEventBound, { capture: !0 }), document.removeEventListener("keydown", this.handleCutEventBound, { capture: !0 }), document.removeEventListener("keydown", this.handleDuplicateEventBound, { capture: !0 }), document.removeEventListener("paste", this.handlePasteEventBound, { capture: !0 }), document.removeEventListener("keydown", this.handleUndoRedoEventBound, { capture: !0 }), document.removeEventListener("keyup", this.handleUndoRedoKeyUpBound, { capture: !0 }), document.removeEventListener("keydown", this.handleSelectAllEventBound, { capture: !0 }), document.removeEventListener("keydown", this.handleDeleteObjectsEventBound, { capture: !0 }), this.options.canvasDragging && (this.canvas.off("mouse:down", this.handleCanvasDragStartBound), this.canvas.off("mouse:move", this.handleCanvasDraggingBound), this.canvas.off("mouse:up", this.handleCanvasDragEndBound), document.removeEventListener("keydown", this.handleSpaceKeyDownBound, { capture: !0 }), document.removeEventListener("keyup", this.handleSpaceKeyUpBound, { capture: !0 })), this.options.mouseWheelZooming && this.canvas.wrapperEl.removeEventListener("wheel", this.handleCanvasWheelZoomBound, { capture: !0 }), this.options.resetObjectFitByDoubleClick && this.canvas.off("mouse:dblclick", this.handleResetObjectFitBound), this.canvas.off("object:modified", this.handleObjectModifiedHistoryBound), this.canvas.off("object:rotating", this.handleObjectRotatingHistoryBound), this.canvas.off("object:added", this.handleObjectAddedHistoryBound), this.canvas.off("object:removed", this.handleObjectRemovedHistoryBound), this.canvas.off("object:moving", this.handleObjectTransformStartBound), this.canvas.off("object:scaling", this.handleObjectTransformStartBound), this.canvas.off("object:rotating", this.handleObjectTransformStartBound), this.canvas.off("object:skewing", this.handleObjectTransformStartBound), this.canvas.off("object:resizing", this.handleObjectTransformStartBound), this.canvas.off("object:modified", this.handleObjectTransformEndBound), this.canvas.off("object:added", this.handleOverlayUpdateBound), this.canvas.off("selection:created", this.handleOverlayUpdateBound), this.canvas.off("object:added", this.handleBackgroundUpdateBound), this.canvas.off("selection:created", this.handleBackgroundUpdateBound);
|
|
199
221
|
}
|
|
200
222
|
static debounce(e, t) {
|
|
201
223
|
let n = null;
|
|
@@ -7254,7 +7276,7 @@ var Si = class {
|
|
|
7254
7276
|
}, this._handleTextChanged = (e) => {
|
|
7255
7277
|
if (!(e.target instanceof v)) return;
|
|
7256
7278
|
let t = e.target;
|
|
7257
|
-
U(t.group) && this.runtime.syncShapeTextLayoutAfterTextMutation({ textNode: t }) && this.runtime.editor.canvas.requestRenderAll();
|
|
7279
|
+
U(t.group) && (this.runtime.editor.textManager.syncLineStylesWithText({ textbox: t }), this.runtime.syncShapeTextLayoutAfterTextMutation({ textNode: t }) && this.runtime.editor.canvas.requestRenderAll());
|
|
7258
7280
|
}, this._handleBeforeTextUpdated = (e) => {
|
|
7259
7281
|
let { textbox: t, style: n } = e;
|
|
7260
7282
|
if (!(t instanceof v)) return;
|
|
@@ -9473,31 +9495,37 @@ var pa = {
|
|
|
9473
9495
|
}
|
|
9474
9496
|
copy() {
|
|
9475
9497
|
let { canvas: e } = this.editor, t = e.getActiveObject();
|
|
9476
|
-
!t || t.locked || (this._cloneToInternalClipboard(t), this.
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
method: "copy",
|
|
9480
|
-
code: "COPY_FAILED",
|
|
9481
|
-
message: "Ошибка копирования объекта в системный буфер обмена",
|
|
9482
|
-
data: e
|
|
9483
|
-
});
|
|
9498
|
+
!t || t.locked || (this._cloneToInternalClipboard(t), this._copyToSystemClipboardInBackground({
|
|
9499
|
+
activeObject: t,
|
|
9500
|
+
method: "copy"
|
|
9484
9501
|
}));
|
|
9485
9502
|
}
|
|
9486
9503
|
async _cloneToInternalClipboard(e) {
|
|
9487
9504
|
let { canvas: t, errorManager: n } = this.editor;
|
|
9488
9505
|
try {
|
|
9489
9506
|
let n = await e.clone(Mt);
|
|
9490
|
-
this._materializeCloneGeometry({ clonedObject: n }), this.clipboard = n, t.fire("editor:object-copied", { object: n });
|
|
9507
|
+
return this._materializeCloneGeometry({ clonedObject: n }), this.clipboard = n, t.fire("editor:object-copied", { object: n }), !0;
|
|
9491
9508
|
} catch (e) {
|
|
9492
|
-
n.emitError({
|
|
9509
|
+
return n.emitError({
|
|
9493
9510
|
origin: "ClipboardManager",
|
|
9494
9511
|
method: "_cloneToInternalClipboard",
|
|
9495
9512
|
code: "CLONE_FAILED",
|
|
9496
9513
|
message: "Ошибка клонирования объекта для внутреннего буфера",
|
|
9497
9514
|
data: e
|
|
9498
|
-
});
|
|
9515
|
+
}), !1;
|
|
9499
9516
|
}
|
|
9500
9517
|
}
|
|
9518
|
+
_copyToSystemClipboardInBackground({ activeObject: e, method: t }) {
|
|
9519
|
+
this._copyToSystemClipboard(e).catch((e) => {
|
|
9520
|
+
this.editor.errorManager.emitWarning({
|
|
9521
|
+
origin: "ClipboardManager",
|
|
9522
|
+
method: t,
|
|
9523
|
+
code: "COPY_FAILED",
|
|
9524
|
+
message: "Ошибка копирования объекта в системный буфер обмена",
|
|
9525
|
+
data: e
|
|
9526
|
+
});
|
|
9527
|
+
});
|
|
9528
|
+
}
|
|
9501
9529
|
async _copyToSystemClipboard(e) {
|
|
9502
9530
|
let { errorManager: t } = this.editor;
|
|
9503
9531
|
if (typeof ClipboardItem > "u" || !navigator.clipboard) return t.emitWarning({
|
|
@@ -9643,6 +9671,27 @@ var pa = {
|
|
|
9643
9671
|
}), !1;
|
|
9644
9672
|
}
|
|
9645
9673
|
}
|
|
9674
|
+
async cut() {
|
|
9675
|
+
let { canvas: t, deletionManager: n, errorManager: r } = this.editor, i = t.getActiveObject();
|
|
9676
|
+
if (!i || i.locked) return !1;
|
|
9677
|
+
try {
|
|
9678
|
+
if (!await this._cloneToInternalClipboard(i)) return !1;
|
|
9679
|
+
this._copyToSystemClipboardInBackground({
|
|
9680
|
+
activeObject: i,
|
|
9681
|
+
method: "cut"
|
|
9682
|
+
});
|
|
9683
|
+
let t = i instanceof e ? i.getObjects() : [i];
|
|
9684
|
+
return !!n.deleteSelectedObjects({ objects: t });
|
|
9685
|
+
} catch (e) {
|
|
9686
|
+
return r.emitError({
|
|
9687
|
+
origin: "ClipboardManager",
|
|
9688
|
+
method: "cut",
|
|
9689
|
+
code: "CUT_FAILED",
|
|
9690
|
+
message: "Ошибка вырезания объекта",
|
|
9691
|
+
data: e
|
|
9692
|
+
}), !1;
|
|
9693
|
+
}
|
|
9694
|
+
}
|
|
9646
9695
|
async handlePasteEvent({ clipboardData: e }) {
|
|
9647
9696
|
if (!e?.items?.length) {
|
|
9648
9697
|
this.paste();
|
|
@@ -10098,6 +10147,7 @@ var pa = {
|
|
|
10098
10147
|
CLIPBOARD_WRITE_IMAGE_FAILED: "CLIPBOARD_WRITE_IMAGE_FAILED",
|
|
10099
10148
|
CLONE_FAILED: "CLONE_FAILED",
|
|
10100
10149
|
COPY_FAILED: "COPY_FAILED",
|
|
10150
|
+
CUT_FAILED: "CUT_FAILED",
|
|
10101
10151
|
PASTE_IMAGE_FAILED: "PASTE_IMAGE_FAILED",
|
|
10102
10152
|
EXTERNAL_PASTE_DEFERRED_REJECTED: "EXTERNAL_PASTE_DEFERRED_REJECTED",
|
|
10103
10153
|
PASTE_HTML_IMAGE_FAILED: "PASTE_HTML_IMAGE_FAILED",
|
|
@@ -11179,10 +11229,10 @@ var Wa = class {
|
|
|
11179
11229
|
e !== i && n.set({ text: e }), n.textCaseRaw = l;
|
|
11180
11230
|
} else n.textCaseRaw = i;
|
|
11181
11231
|
if (!r && o === void 0 && (n.autoExpand = !0), r) {
|
|
11182
|
-
this.
|
|
11232
|
+
this.syncLineStylesWithText({ textbox: n });
|
|
11183
11233
|
return;
|
|
11184
11234
|
}
|
|
11185
|
-
this.
|
|
11235
|
+
this.syncLineStylesWithText({ textbox: n }), this._normalizeTextboxAfterContentChange({
|
|
11186
11236
|
textbox: n,
|
|
11187
11237
|
placement: u,
|
|
11188
11238
|
shouldAutoExpand: c,
|
|
@@ -11237,7 +11287,7 @@ var Wa = class {
|
|
|
11237
11287
|
resolveTextObject: (e) => this._resolveTextObject(e),
|
|
11238
11288
|
normalizeTextboxAfterContentChange: (e) => this._normalizeTextboxAfterContentChange(e),
|
|
11239
11289
|
restoreTextboxContentPlacement: (e) => this._restoreTextboxContentPlacement(e),
|
|
11240
|
-
syncLineStylesWithText: (e) => this.
|
|
11290
|
+
syncLineStylesWithText: (e) => this.syncLineStylesWithText(e),
|
|
11241
11291
|
getSnapshot: (t) => e._getSnapshot(t)
|
|
11242
11292
|
} }), this.editingPlacementState = /* @__PURE__ */ new WeakMap(), this.isTextEditingActive = !1, this._bindEvents(), Ia();
|
|
11243
11293
|
}
|
|
@@ -11414,7 +11464,7 @@ var Wa = class {
|
|
|
11414
11464
|
let { canvas: e } = this;
|
|
11415
11465
|
e.on("object:scaling", this.scalingController.handleObjectScaling), e.on("object:resizing", this._handleObjectResizing), e.on("object:modified", this.scalingController.handleObjectModified), e.on("mouse:move", this.scalingController.handleMouseMove), e.on("text:editing:entered", this._handleTextEditingEntered), e.on("text:editing:exited", this._handleTextEditingExited), e.on("text:changed", this._handleTextChanged);
|
|
11416
11466
|
}
|
|
11417
|
-
|
|
11467
|
+
syncLineStylesWithText({ textbox: e, previousText: t, currentText: n }) {
|
|
11418
11468
|
let r = n ?? e.text ?? "", i = Xi({
|
|
11419
11469
|
textbox: e,
|
|
11420
11470
|
previousText: t ?? e.__lineDefaultsPrevText ?? r,
|
|
@@ -13854,6 +13904,8 @@ var Wa = class {
|
|
|
13854
13904
|
mouseWheelZooming: !0,
|
|
13855
13905
|
canvasDragging: !0,
|
|
13856
13906
|
copyObjectsByHotkey: !0,
|
|
13907
|
+
cutObjectsByHotkey: !0,
|
|
13908
|
+
duplicateObjectsByHotkey: !0,
|
|
13857
13909
|
pasteImageFromClipboard: !0,
|
|
13858
13910
|
undoRedoByHotKeys: !0,
|
|
13859
13911
|
selectAllByHotkey: !0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anu3ev/fabric-image-editor",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.26",
|
|
4
4
|
"description": "TypeScript image editor library built on FabricJS, allowing you to create instances with an integrated montage area and providing an API to modify and manage state.",
|
|
5
5
|
"module": "dist/main.js",
|
|
6
6
|
"files": [
|