@anu3ev/fabric-image-editor 0.1.64 → 0.1.66
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 +151 -151
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var ye = Object.defineProperty, pe = Object.defineProperties;
|
|
2
|
+
var Ie = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Y = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var le = Object.prototype.hasOwnProperty, he = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var de = (r, e, t) => e in r ? ye(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, y = (r, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
le.call(e, t) && de(r, t, e[t]);
|
|
8
8
|
if (Y)
|
|
9
9
|
for (var t of Y(e))
|
|
10
|
-
|
|
10
|
+
he.call(e, t) && de(r, t, e[t]);
|
|
11
11
|
return r;
|
|
12
|
-
},
|
|
12
|
+
}, ge = (r, e) => pe(r, Ie(e));
|
|
13
13
|
var _ = (r, e) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var s in r)
|
|
16
|
-
|
|
16
|
+
le.call(r, s) && e.indexOf(s) < 0 && (t[s] = r[s]);
|
|
17
17
|
if (r != null && Y)
|
|
18
18
|
for (var s of Y(r))
|
|
19
|
-
e.indexOf(s) < 0 &&
|
|
19
|
+
e.indexOf(s) < 0 && he.call(r, s) && (t[s] = r[s]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
var v = (r, e, t) => new Promise((s, n) => {
|
|
@@ -35,15 +35,15 @@ var v = (r, e, t) => new Promise((s, n) => {
|
|
|
35
35
|
}, o = (d) => d.done ? s(d.value) : Promise.resolve(d.value).then(i, a);
|
|
36
36
|
o((t = t.apply(r, e)).next());
|
|
37
37
|
});
|
|
38
|
-
import { ActiveSelection as p, util as H, controlsUtils as
|
|
39
|
-
import { create as
|
|
40
|
-
import
|
|
41
|
-
var
|
|
38
|
+
import { ActiveSelection as p, util as H, controlsUtils as ve, InteractiveFabricObject as Ae, loadSVGFromURL as Se, FabricImage as R, Point as P, Rect as Ce, Circle as Ne, Triangle as De, Group as J, Canvas as Le, Pattern as we } from "fabric";
|
|
39
|
+
import { create as Ee } from "jsondiffpatch";
|
|
40
|
+
import Oe from "diff-match-patch";
|
|
41
|
+
var Te = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", L = function() {
|
|
42
42
|
for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 21, t = "", s = crypto.getRandomValues(new Uint8Array(e |= 0)); e--; )
|
|
43
|
-
t +=
|
|
43
|
+
t += Te[s[e] & 63];
|
|
44
44
|
return t;
|
|
45
45
|
};
|
|
46
|
-
class
|
|
46
|
+
class z {
|
|
47
47
|
/**
|
|
48
48
|
* Конструктор принимает редактор и опции.
|
|
49
49
|
* @param params
|
|
@@ -61,7 +61,7 @@ class R {
|
|
|
61
61
|
* @param params.options.adaptCanvasToContainerOnResize — адаптировать канвас к размерам контейнера при изменении размеров окна
|
|
62
62
|
*/
|
|
63
63
|
constructor({ editor: e, options: t = {} }) {
|
|
64
|
-
this.isDragging = !1, this.lastMouseX = 0, this.lastMouseY = 0, this.isUndoRedoKeyPressed = !1, this.isSpacePressed = !1, this.savedSelection = [], this.canvasDragging = !1, this.mouseWheelZooming = !1, this.bringToFrontOnSelection = !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 = t, this.handleContainerResizeBound =
|
|
64
|
+
this.isDragging = !1, this.lastMouseX = 0, this.lastMouseY = 0, this.isUndoRedoKeyPressed = !1, this.isSpacePressed = !1, this.savedSelection = [], this.canvasDragging = !1, this.mouseWheelZooming = !1, this.bringToFrontOnSelection = !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 = t, this.handleContainerResizeBound = z.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 = z.debounce(this.handleObjectModifiedHistory.bind(this), 300), this.handleObjectRotatingHistoryBound = z.debounce(this.handleObjectRotatingHistory.bind(this), 300), this.handleObjectAddedHistoryBound = this.handleObjectAddedHistory.bind(this), this.handleObjectRemovedHistoryBound = this.handleObjectRemovedHistory.bind(this), this.handleOverlayUpdateBound = this.handleOverlayUpdate.bind(this), this.handleCanvasDragStartBound = this.handleCanvasDragStart.bind(this), this.handleCanvasDraggingBound = this.handleCanvasDragging.bind(this), this.handleCanvasDragEndBound = this.handleCanvasDragEnd.bind(this), this.handleMouseWheelZoomBound = this.handleMouseWheelZoom.bind(this), this.handleBringToFrontBound = this.handleBringToFront.bind(this), this.handleResetObjectFitBound = this.handleResetObjectFit.bind(this), this.handleLockedSelectionBound = this._filterLockedSelection.bind(this), this.init();
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Инициализация всех обработчиков согласно опциям.
|
|
@@ -364,7 +364,7 @@ class R {
|
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
class
|
|
367
|
+
class ke {
|
|
368
368
|
/**
|
|
369
369
|
* Класс для динамической загрузки внешних модулей.
|
|
370
370
|
*/
|
|
@@ -382,7 +382,7 @@ class Te {
|
|
|
382
382
|
return this.loaders[e] ? (this.cache.has(e) || this.cache.set(e, this.loaders[e]()), this.cache.get(e)) : Promise.reject(new Error(`Unknown module "${e}"`));
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function xe(r) {
|
|
386
386
|
return new Worker(
|
|
387
387
|
"" + new URL("assets/worker-CN39s7P7.js", import.meta.url).href,
|
|
388
388
|
{
|
|
@@ -390,13 +390,13 @@ function ke(r) {
|
|
|
390
390
|
}
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
|
-
class
|
|
393
|
+
class Be {
|
|
394
394
|
/**
|
|
395
395
|
* @param scriptUrl — URL скрипта воркера.
|
|
396
396
|
* По-умолчанию использует DefaultWorker из соседнего файла
|
|
397
397
|
*/
|
|
398
398
|
constructor(e) {
|
|
399
|
-
e ? this.worker = new Worker(e, { type: "module" }) : this.worker = new
|
|
399
|
+
e ? this.worker = new Worker(e, { type: "module" }) : this.worker = new xe(), this._callbacks = /* @__PURE__ */ new Map(), this.worker.onmessage = this._handleMessage.bind(this);
|
|
400
400
|
}
|
|
401
401
|
/**
|
|
402
402
|
* Обработчик сообщений от воркера
|
|
@@ -436,26 +436,26 @@ class xe {
|
|
|
436
436
|
this.worker.terminate();
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
const N = 12,
|
|
439
|
+
const N = 12, Ue = 2, K = 8, q = 20, Re = 100, ee = 20, te = 8, Ze = 100, F = 32, se = 1, ze = "#2B2D33", ne = "#3D8BF4", ie = "#FFFFFF";
|
|
440
440
|
function W(r, e, t, s, n) {
|
|
441
|
-
const i = N, a =
|
|
442
|
-
r.save(), r.translate(e, t), r.rotate(H.degreesToRadians(n.angle)), r.fillStyle =
|
|
443
|
-
}
|
|
444
|
-
function ge(r, e, t, s, n) {
|
|
445
|
-
const i = J, a = K, o = Ze;
|
|
446
|
-
r.save(), r.translate(e, t), r.rotate(H.degreesToRadians(n.angle)), r.fillStyle = ne, r.strokeStyle = se, r.lineWidth = te, r.beginPath(), r.roundRect(-i / 2, -a / 2, i, a, o), r.fill(), r.stroke(), r.restore();
|
|
441
|
+
const i = N, a = Ue;
|
|
442
|
+
r.save(), r.translate(e, t), r.rotate(H.degreesToRadians(n.angle)), r.fillStyle = ie, r.strokeStyle = ne, r.lineWidth = se, r.beginPath(), r.roundRect(-i / 2, -i / 2, i, i, a), r.fill(), r.stroke(), r.restore();
|
|
447
443
|
}
|
|
448
444
|
function ue(r, e, t, s, n) {
|
|
449
|
-
const i =
|
|
450
|
-
r.save(), r.translate(e, t), r.rotate(H.degreesToRadians(n.angle)), r.fillStyle =
|
|
445
|
+
const i = K, a = q, o = Re;
|
|
446
|
+
r.save(), r.translate(e, t), r.rotate(H.degreesToRadians(n.angle)), r.fillStyle = ie, r.strokeStyle = ne, r.lineWidth = se, r.beginPath(), r.roundRect(-i / 2, -a / 2, i, a, o), r.fill(), r.stroke(), r.restore();
|
|
447
|
+
}
|
|
448
|
+
function Me(r, e, t, s, n) {
|
|
449
|
+
const i = ee, a = te, o = Ze;
|
|
450
|
+
r.save(), r.translate(e, t), r.rotate(H.degreesToRadians(n.angle)), r.fillStyle = ie, r.strokeStyle = ne, r.lineWidth = se, r.beginPath(), r.roundRect(-i / 2, -a / 2, i, a, o), r.fill(), r.stroke(), r.restore();
|
|
451
451
|
}
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
function
|
|
452
|
+
const He = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE4Ljc1IDQuMzc1djMuNzVhLjYyNS42MjUgMCAwIDEtLjYyNS42MjVoLTMuNzVhLjYyNS42MjUgMCAwIDEgMC0xLjI1aDIuMTRsLTIuMDc3LTEuOTAzLS4wMi0uMDE5YTYuMjUgNi4yNSAwIDEgMC0uMTMgOC45NjcuNjI2LjYyNiAwIDAgMSAuODYuOTA5QTcuNDU2IDcuNDU2IDAgMCAxIDEwIDE3LjVoLS4xMDNhNy41IDcuNSAwIDEgMSA1LjM5Ni0xMi44MTJMMTcuNSA2LjcwM1Y0LjM3NWEuNjI1LjYyNSAwIDAgMSAxLjI1IDBaIi8+PC9zdmc+", fe = new Image();
|
|
453
|
+
fe.src = He;
|
|
454
|
+
function Ye(r, e, t, s, n) {
|
|
455
455
|
const a = F / 2;
|
|
456
|
-
r.save(), r.translate(e, t), r.rotate(H.degreesToRadians(n.angle)), r.fillStyle = ze, r.beginPath(), r.arc(0, 0, a, 0, 2 * Math.PI), r.fill(), r.drawImage(
|
|
456
|
+
r.save(), r.translate(e, t), r.rotate(H.degreesToRadians(n.angle)), r.fillStyle = ze, r.beginPath(), r.arc(0, 0, a, 0, 2 * Math.PI), r.fill(), r.drawImage(fe, -a / 2, -a / 2, a, a), r.restore();
|
|
457
457
|
}
|
|
458
|
-
const
|
|
458
|
+
const _e = {
|
|
459
459
|
// Угловые точки
|
|
460
460
|
tl: {
|
|
461
461
|
render: W,
|
|
@@ -487,47 +487,47 @@ const Ye = {
|
|
|
487
487
|
},
|
|
488
488
|
// Середина вертикалей
|
|
489
489
|
ml: {
|
|
490
|
-
render:
|
|
491
|
-
sizeX:
|
|
492
|
-
sizeY:
|
|
490
|
+
render: ue,
|
|
491
|
+
sizeX: K,
|
|
492
|
+
sizeY: q,
|
|
493
493
|
offsetX: 0,
|
|
494
494
|
offsetY: 0
|
|
495
495
|
},
|
|
496
496
|
mr: {
|
|
497
|
-
render:
|
|
498
|
-
sizeX:
|
|
499
|
-
sizeY:
|
|
497
|
+
render: ue,
|
|
498
|
+
sizeX: K,
|
|
499
|
+
sizeY: q,
|
|
500
500
|
offsetX: 0,
|
|
501
501
|
offsetY: 0
|
|
502
502
|
},
|
|
503
503
|
// Середина горизонталей
|
|
504
504
|
mt: {
|
|
505
|
-
render:
|
|
506
|
-
sizeX:
|
|
507
|
-
sizeY:
|
|
505
|
+
render: Me,
|
|
506
|
+
sizeX: ee,
|
|
507
|
+
sizeY: te,
|
|
508
508
|
offsetX: 0,
|
|
509
509
|
offsetY: 0
|
|
510
510
|
},
|
|
511
511
|
mb: {
|
|
512
|
-
render:
|
|
513
|
-
sizeX:
|
|
514
|
-
sizeY:
|
|
512
|
+
render: Me,
|
|
513
|
+
sizeX: ee,
|
|
514
|
+
sizeY: te,
|
|
515
515
|
offsetX: 0,
|
|
516
516
|
offsetY: 0
|
|
517
517
|
},
|
|
518
518
|
// Специальный «rotate» контрол
|
|
519
519
|
mtr: {
|
|
520
|
-
render:
|
|
520
|
+
render: Ye,
|
|
521
521
|
sizeX: F,
|
|
522
522
|
sizeY: F,
|
|
523
523
|
offsetX: 0,
|
|
524
524
|
offsetY: -F
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
|
-
class
|
|
527
|
+
class We {
|
|
528
528
|
static apply() {
|
|
529
|
-
const e =
|
|
530
|
-
Object.entries(
|
|
529
|
+
const e = ve.createObjectDefaultControls();
|
|
530
|
+
Object.entries(_e).forEach(([t, s]) => {
|
|
531
531
|
Object.assign(e[t], {
|
|
532
532
|
render: s.render,
|
|
533
533
|
sizeX: s.sizeX,
|
|
@@ -538,10 +538,10 @@ class _e {
|
|
|
538
538
|
var l;
|
|
539
539
|
(l = a.target.canvas) == null || l.setCursor("grabbing");
|
|
540
540
|
});
|
|
541
|
-
}),
|
|
541
|
+
}), Ae.ownDefaults.controls = e;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
const
|
|
544
|
+
const Pe = "data:image/svg+x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MyAwbC0zLjk3LTIuMzE2TDMuNzQgMTBaIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=", Je = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0VDNEU0MCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC4xMjUgMS4yNUExLjg3NSAxLjg3NSAwIDAgMCA2LjI1IDMuMTI1di42MjVIMy4xMjVhLjYyNS42MjUgMCAwIDAgMCAxLjI1aC42MjV2MTEuMjVBMS4yNSAxLjI1IDAgMCAwIDUgMTcuNWgxMGExLjI1IDEuMjUgMCAwIDAgMS4yNS0xLjI1VjVoLjYyNWEuNjI1LjYyNSAwIDAgMCAwLTEuMjVIMTMuNzV2LS42MjVhMS44NzUgMS44NzUgMCAwIDAtMS44NzUtMS44NzVoLTMuNzVabTQuMzc1IDIuNXYtLjYyNWEuNjI1LjYyNSAwIDAgMC0uNjI1LS42MjVoLTMuNzVhLjYyNS42MjUgMCAwIDAtLjYyNS42MjV2LjYyNWg1Wk01IDE2LjI1VjVoMTB2MTEuMjVINVpNOC4xMjUgNy41Yy4zNDUgMCAuNjI1LjI4LjYyNS42MjV2NWEuNjI1LjYyNSAwIDEgMS0xLjI1IDB2LTVjMC0uMzQ1LjI4LS42MjUuNjI1LS42MjVabTQuMzc1IDUuNjI1di01YS42MjUuNjI1IDAgMCAwLTEuMjUgMHY1YS42MjUuNjI1IDAgMSAwIDEuMjUgMFoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==", Z = {
|
|
545
545
|
style: {
|
|
546
546
|
position: "absolute",
|
|
547
547
|
display: "none",
|
|
@@ -608,14 +608,14 @@ const We = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
608
608
|
],
|
|
609
609
|
offsetTop: 50,
|
|
610
610
|
icons: {
|
|
611
|
-
copyPaste:
|
|
612
|
-
delete:
|
|
613
|
-
lock:
|
|
614
|
-
unlock:
|
|
615
|
-
bringToFront:
|
|
616
|
-
sendToBack:
|
|
617
|
-
bringForward:
|
|
618
|
-
sendBackwards:
|
|
611
|
+
copyPaste: Pe,
|
|
612
|
+
delete: Je,
|
|
613
|
+
lock: Fe,
|
|
614
|
+
unlock: Ve,
|
|
615
|
+
bringToFront: Qe,
|
|
616
|
+
sendToBack: $e,
|
|
617
|
+
bringForward: Ge,
|
|
618
|
+
sendBackwards: Xe
|
|
619
619
|
},
|
|
620
620
|
handlers: {
|
|
621
621
|
copyPaste: (r) => v(null, null, function* () {
|
|
@@ -646,18 +646,18 @@ const We = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
};
|
|
649
|
-
class
|
|
649
|
+
class Ke {
|
|
650
650
|
constructor({ editor: e }) {
|
|
651
651
|
this.currentTarget = null, this.currentLocked = !1, this.isTransforming = !1, this.editor = e, this.canvas = e.canvas, this.options = e.options, this._initToolbar();
|
|
652
652
|
}
|
|
653
653
|
_initToolbar() {
|
|
654
654
|
if (!this.options.showToolbar) return;
|
|
655
655
|
const e = this.options.toolbar || {};
|
|
656
|
-
this.config =
|
|
657
|
-
style: y(y({},
|
|
658
|
-
btnStyle: y(y({},
|
|
659
|
-
icons: y(y({},
|
|
660
|
-
handlers: y(y({},
|
|
656
|
+
this.config = ge(y(y({}, Z), e), {
|
|
657
|
+
style: y(y({}, Z.style), e.style || {}),
|
|
658
|
+
btnStyle: y(y({}, Z.btnStyle), e.btnStyle || {}),
|
|
659
|
+
icons: y(y({}, Z.icons), e.icons || {}),
|
|
660
|
+
handlers: y(y({}, Z.handlers), e.handlers || {})
|
|
661
661
|
}), this.currentTarget = null, this.currentLocked = !1, this.isTransforming = !1, this._onMouseDown = this._handleMouseDown.bind(this), this._onObjectMoving = this._startTransform.bind(this), this._onObjectScaling = this._startTransform.bind(this), this._onObjectRotating = this._startTransform.bind(this), this._onMouseUp = this._endTransform.bind(this), this._onObjectModified = this._endTransform.bind(this), this._onSelectionChange = this._updateToolbar.bind(this), this._onSelectionClear = () => {
|
|
662
662
|
this.el.style.display = "none";
|
|
663
663
|
}, this._createDOM(), this._bindEvents();
|
|
@@ -762,7 +762,7 @@ class Je {
|
|
|
762
762
|
this.el.removeEventListener("mouseover", this._onBtnOver), this.el.removeEventListener("mouseout", this._onBtnOut), this.canvas.off("mouse:down", this._onMouseDown), this.canvas.off("object:moving", this._onObjectMoving), this.canvas.off("object:scaling", this._onObjectScaling), this.canvas.off("object:rotating", this._onObjectRotating), this.canvas.off("mouse:up", this._onMouseUp), this.canvas.off("object:modified", this._onObjectModified), this.canvas.off("selection:created", this._onSelectionChange), this.canvas.off("selection:updated", this._onSelectionChange), this.canvas.off("after:render", this._onSelectionChange), this.canvas.off("selection:cleared", this._onSelectionClear), this.el.remove();
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
|
-
class
|
|
765
|
+
class qe {
|
|
766
766
|
constructor({ editor: e }) {
|
|
767
767
|
this.editor = e, this.canvas = e.canvas, this._historySuspendCount = 0, this.baseState = null, this.patches = [], this.currentIndex = 0, this.maxHistoryLength = e.options.maxHistoryLength, this.totalChangesCount = 0, this.baseStateChangesCount = 0, this._createDiffPatcher();
|
|
768
768
|
}
|
|
@@ -774,7 +774,7 @@ class Ke {
|
|
|
774
774
|
return this.patches[this.currentIndex - 1] || null;
|
|
775
775
|
}
|
|
776
776
|
_createDiffPatcher() {
|
|
777
|
-
this.diffPatcher =
|
|
777
|
+
this.diffPatcher = Ee({
|
|
778
778
|
objectHash(e) {
|
|
779
779
|
const t = e;
|
|
780
780
|
return [
|
|
@@ -798,7 +798,7 @@ class Ke {
|
|
|
798
798
|
includeValueOnMove: !1
|
|
799
799
|
},
|
|
800
800
|
textDiff: {
|
|
801
|
-
diffMatchPatch:
|
|
801
|
+
diffMatchPatch: Oe,
|
|
802
802
|
minLength: 60
|
|
803
803
|
}
|
|
804
804
|
});
|
|
@@ -965,7 +965,7 @@ class Ke {
|
|
|
965
965
|
});
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
const
|
|
968
|
+
const et = 0.1, tt = 2, st = 0.1, nt = 90, B = 16, U = 16, O = 4096, T = 4096, $ = "application/image-editor:";
|
|
969
969
|
class D {
|
|
970
970
|
constructor({ editor: e }) {
|
|
971
971
|
this.editor = e, this.options = e.options, this._createdBlobUrls = [], this.acceptContentTypes = this.editor.options.acceptContentTypes, this.acceptFormats = this.getAllowedFormatsFromContentTypes();
|
|
@@ -1018,20 +1018,20 @@ class D {
|
|
|
1018
1018
|
data: { source: t, format: h, contentType: l, acceptContentTypes: g, acceptFormats: u }
|
|
1019
1019
|
}), null;
|
|
1020
1020
|
if (this._createdBlobUrls.push(m), h === "svg") {
|
|
1021
|
-
const b = yield
|
|
1021
|
+
const b = yield Se(m);
|
|
1022
1022
|
M = H.groupSVGElements(b.objects, b.options);
|
|
1023
1023
|
} else
|
|
1024
|
-
M = yield
|
|
1024
|
+
M = yield R.fromURL(m, { crossOrigin: "anonymous" });
|
|
1025
1025
|
const { width: f, height: j } = M;
|
|
1026
|
-
if (M instanceof
|
|
1026
|
+
if (M instanceof R) {
|
|
1027
1027
|
const b = M.getElement();
|
|
1028
1028
|
let S = "";
|
|
1029
1029
|
if (b instanceof HTMLImageElement ? S = b.src : b instanceof HTMLCanvasElement && (S = b.toDataURL()), j > T || f > O) {
|
|
1030
1030
|
const w = yield this.resizeImageToBoundaries(S, "max"), E = URL.createObjectURL(w);
|
|
1031
|
-
this._createdBlobUrls.push(E), M = yield
|
|
1032
|
-
} else if (j <
|
|
1031
|
+
this._createdBlobUrls.push(E), M = yield R.fromURL(E, { crossOrigin: "anonymous" });
|
|
1032
|
+
} else if (j < U || f < B) {
|
|
1033
1033
|
const w = yield this.resizeImageToBoundaries(S, "min"), E = URL.createObjectURL(w);
|
|
1034
|
-
this._createdBlobUrls.push(E), M = yield
|
|
1034
|
+
this._createdBlobUrls.push(E), M = yield R.fromURL(E, { crossOrigin: "anonymous" });
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
if (M.set("id", `${M.type}-${L()}`), M.set("format", h), s === "scale-montage")
|
|
@@ -1072,14 +1072,14 @@ class D {
|
|
|
1072
1072
|
resizeImageToBoundaries(e, t = "max") {
|
|
1073
1073
|
return v(this, null, function* () {
|
|
1074
1074
|
let s = `Размер изображения больше максимального размера канваса, поэтому оно будет уменьшено до максимальных размеров c сохранением пропорций: ${O}x${T}`;
|
|
1075
|
-
t === "min" && (s = `Размер изображения меньше минимального размера канваса, поэтому оно будет увеличено до минимальных размеров c сохранением пропорций: ${B}x${
|
|
1075
|
+
t === "min" && (s = `Размер изображения меньше минимального размера канваса, поэтому оно будет увеличено до минимальных размеров c сохранением пропорций: ${B}x${U}`);
|
|
1076
1076
|
const n = {
|
|
1077
1077
|
dataURL: e,
|
|
1078
1078
|
sizeType: t,
|
|
1079
1079
|
maxWidth: O,
|
|
1080
1080
|
maxHeight: T,
|
|
1081
1081
|
minWidth: B,
|
|
1082
|
-
minHeight:
|
|
1082
|
+
minHeight: U
|
|
1083
1083
|
};
|
|
1084
1084
|
return this.editor.errorManager.emitWarning({
|
|
1085
1085
|
origin: "ImageManager",
|
|
@@ -1152,27 +1152,27 @@ class D {
|
|
|
1152
1152
|
[S]
|
|
1153
1153
|
);
|
|
1154
1154
|
if (c) {
|
|
1155
|
-
const k = m * 0.264583, C = M * 0.264583,
|
|
1155
|
+
const k = m * 0.264583, C = M * 0.264583, je = (yield this.editor.moduleLoader.loadModule("jspdf")).jsPDF, Q = new je({
|
|
1156
1156
|
orientation: k > C ? "landscape" : "portrait",
|
|
1157
1157
|
unit: "mm",
|
|
1158
1158
|
format: [k, C]
|
|
1159
1159
|
});
|
|
1160
1160
|
if (Q.addImage(String(w), "JPG", 0, 0, k, C), n) {
|
|
1161
|
-
const
|
|
1161
|
+
const ce = {
|
|
1162
1162
|
image: Q.output("datauristring"),
|
|
1163
1163
|
format: "pdf",
|
|
1164
1164
|
contentType: "application/pdf",
|
|
1165
1165
|
fileName: t
|
|
1166
1166
|
};
|
|
1167
|
-
return a.fire("editor:canvas-exported",
|
|
1167
|
+
return a.fire("editor:canvas-exported", ce), ce;
|
|
1168
1168
|
}
|
|
1169
|
-
const
|
|
1170
|
-
image: new File([
|
|
1169
|
+
const be = Q.output("blob"), re = {
|
|
1170
|
+
image: new File([be], t, { type: "application/pdf" }),
|
|
1171
1171
|
format: "pdf",
|
|
1172
1172
|
contentType: "application/pdf",
|
|
1173
1173
|
fileName: t
|
|
1174
1174
|
};
|
|
1175
|
-
return a.fire("editor:canvas-exported",
|
|
1175
|
+
return a.fire("editor:canvas-exported", re), re;
|
|
1176
1176
|
}
|
|
1177
1177
|
if (n) {
|
|
1178
1178
|
const I = {
|
|
@@ -1183,13 +1183,13 @@ class D {
|
|
|
1183
1183
|
};
|
|
1184
1184
|
return a.fire("editor:canvas-exported", I), I;
|
|
1185
1185
|
}
|
|
1186
|
-
const E = h === "svg" && !A ? t.replace(/\.[^/.]+$/, ".png") : t,
|
|
1186
|
+
const E = h === "svg" && !A ? t.replace(/\.[^/.]+$/, ".png") : t, oe = {
|
|
1187
1187
|
image: new File([b], E, { type: l }),
|
|
1188
1188
|
format: h,
|
|
1189
1189
|
contentType: l,
|
|
1190
1190
|
fileName: E
|
|
1191
1191
|
};
|
|
1192
|
-
return a.fire("editor:canvas-exported",
|
|
1192
|
+
return a.fire("editor:canvas-exported", oe), oe;
|
|
1193
1193
|
} catch (c) {
|
|
1194
1194
|
return this.editor.errorManager.emitError({
|
|
1195
1195
|
origin: "ImageManager",
|
|
@@ -1245,7 +1245,7 @@ class D {
|
|
|
1245
1245
|
};
|
|
1246
1246
|
return o.fire("editor:object-exported", j), j;
|
|
1247
1247
|
}
|
|
1248
|
-
if (i && c instanceof
|
|
1248
|
+
if (i && c instanceof R) {
|
|
1249
1249
|
const M = yield createImageBitmap(c.getElement()), f = yield d.post(
|
|
1250
1250
|
"toDataURL",
|
|
1251
1251
|
{
|
|
@@ -1414,11 +1414,11 @@ class D {
|
|
|
1414
1414
|
return t ? t[1] : "";
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
|
-
const x = (r, e, t) => Math.max(Math.min(r, t), e),
|
|
1418
|
-
function
|
|
1417
|
+
const x = (r, e, t) => Math.max(Math.min(r, t), e), me = (r, e) => r * e, it = (r, e) => new P(r / 2, e / 2);
|
|
1418
|
+
function at(r) {
|
|
1419
1419
|
return ((r == null ? void 0 : r.type) === "image" || (r == null ? void 0 : r.format) === "svg") && typeof (r == null ? void 0 : r.width) == "number" && typeof (r == null ? void 0 : r.height) == "number";
|
|
1420
1420
|
}
|
|
1421
|
-
class
|
|
1421
|
+
class ot {
|
|
1422
1422
|
/**
|
|
1423
1423
|
* @param options
|
|
1424
1424
|
* @param options.editor – экземпляр редактора
|
|
@@ -1451,7 +1451,7 @@ class at {
|
|
|
1451
1451
|
options: { canvasBackstoreWidth: o }
|
|
1452
1452
|
} = this.editor, { width: d, height: c } = a, l = x(Number(e), B, O);
|
|
1453
1453
|
if (!o || o === "auto" || n ? this.adaptCanvasToContainer() : o ? this.setCanvasBackstoreWidth(Number(o)) : this.setCanvasBackstoreWidth(l), a.set({ width: l }), (m = i.clipPath) == null || m.set({ width: l }), t) {
|
|
1454
|
-
const M = l / d, f =
|
|
1454
|
+
const M = l / d, f = me(c, M);
|
|
1455
1455
|
this.setResolutionHeight(f);
|
|
1456
1456
|
return;
|
|
1457
1457
|
}
|
|
@@ -1479,9 +1479,9 @@ class at {
|
|
|
1479
1479
|
canvas: i,
|
|
1480
1480
|
montageArea: a,
|
|
1481
1481
|
options: { canvasBackstoreHeight: o }
|
|
1482
|
-
} = this.editor, { width: d, height: c } = a, l = x(Number(e),
|
|
1482
|
+
} = this.editor, { width: d, height: c } = a, l = x(Number(e), U, T);
|
|
1483
1483
|
if (!o || o === "auto" || n ? this.adaptCanvasToContainer() : o ? this.setCanvasBackstoreHeight(Number(o)) : this.setCanvasBackstoreHeight(l), a.set({ height: l }), (m = i.clipPath) == null || m.set({ height: l }), t) {
|
|
1484
|
-
const M = l / c, f =
|
|
1484
|
+
const M = l / c, f = me(d, M);
|
|
1485
1485
|
this.setResolutionWidth(f);
|
|
1486
1486
|
return;
|
|
1487
1487
|
}
|
|
@@ -1499,7 +1499,7 @@ class at {
|
|
|
1499
1499
|
*/
|
|
1500
1500
|
centerMontageArea() {
|
|
1501
1501
|
var d;
|
|
1502
|
-
const { canvas: e, montageArea: t } = this.editor, s = e.getWidth(), n = e.getHeight(), i = e.getZoom(), a =
|
|
1502
|
+
const { canvas: e, montageArea: t } = this.editor, s = e.getWidth(), n = e.getHeight(), i = e.getZoom(), a = it(s, n);
|
|
1503
1503
|
t.set({
|
|
1504
1504
|
left: s / 2,
|
|
1505
1505
|
top: n / 2
|
|
@@ -1541,7 +1541,7 @@ class at {
|
|
|
1541
1541
|
*/
|
|
1542
1542
|
setCanvasBackstoreHeight(e) {
|
|
1543
1543
|
if (!e || typeof e != "number") return;
|
|
1544
|
-
const t = x(e,
|
|
1544
|
+
const t = x(e, U, T);
|
|
1545
1545
|
this.editor.canvas.setDimensions({ height: t }, { backstoreOnly: !0 });
|
|
1546
1546
|
}
|
|
1547
1547
|
/**
|
|
@@ -1550,7 +1550,7 @@ class at {
|
|
|
1550
1550
|
* с учётом минимальных и максимальных значений.
|
|
1551
1551
|
*/
|
|
1552
1552
|
adaptCanvasToContainer() {
|
|
1553
|
-
const { canvas: e } = this.editor, t = this.getEditorContainer(), s = t.clientWidth, n = t.clientHeight, i = x(s, B, O), a = x(n,
|
|
1553
|
+
const { canvas: e } = this.editor, t = this.getEditorContainer(), s = t.clientWidth, n = t.clientHeight, i = x(s, B, O), a = x(n, U, T);
|
|
1554
1554
|
e.setDimensions({ width: i, height: a }, { backstoreOnly: !0 });
|
|
1555
1555
|
}
|
|
1556
1556
|
/**
|
|
@@ -1750,7 +1750,7 @@ class at {
|
|
|
1750
1750
|
montageAreaHeight: d
|
|
1751
1751
|
}
|
|
1752
1752
|
} = this.editor, c = e || n.getActiveObject();
|
|
1753
|
-
if (!
|
|
1753
|
+
if (!at(c)) return;
|
|
1754
1754
|
const { width: l, height: h } = c;
|
|
1755
1755
|
let g = Math.min(l, O), u = Math.min(h, T);
|
|
1756
1756
|
if (t) {
|
|
@@ -1803,9 +1803,9 @@ class at {
|
|
|
1803
1803
|
return e.getObjects().filter((i) => i.id !== t.id && i.id !== (s == null ? void 0 : s.id));
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
|
-
class
|
|
1806
|
+
class rt {
|
|
1807
1807
|
constructor({ editor: e }) {
|
|
1808
|
-
this.editor = e, this.options = e.options, this.minZoom = this.options.minZoom ||
|
|
1808
|
+
this.editor = e, this.options = e.options, this.minZoom = this.options.minZoom || et, this.maxZoom = this.options.maxZoom || tt, this.defaultZoom = this.options.defaultScale, this.maxZoomFactor = this.options.maxZoomFactor;
|
|
1809
1809
|
}
|
|
1810
1810
|
/**
|
|
1811
1811
|
* Метод рассчитывает и применяет зум по умолчанию для монтажной области редактора.
|
|
@@ -1816,9 +1816,7 @@ class ot {
|
|
|
1816
1816
|
*/
|
|
1817
1817
|
calculateAndApplyDefaultZoom(e = this.options.defaultScale) {
|
|
1818
1818
|
const { canvas: t } = this.editor, s = t.editorContainer, n = s.clientWidth, i = s.clientHeight, { width: a, height: o } = this.editor.montageArea, d = n / a * e, c = i / o * e;
|
|
1819
|
-
this.defaultZoom = Math.min(d, c);
|
|
1820
|
-
const { defaultZoom: l, maxZoomFactor: h, minZoom: g, maxZoom: u } = this;
|
|
1821
|
-
this.minZoom = Math.min(l / h, g), this.maxZoom = Math.max(l * h, u), this.setZoom();
|
|
1819
|
+
this.defaultZoom = Math.min(d, c), this.setZoom();
|
|
1822
1820
|
}
|
|
1823
1821
|
/**
|
|
1824
1822
|
* Увеличение/уменьшение масштаба
|
|
@@ -1829,16 +1827,12 @@ class ot {
|
|
|
1829
1827
|
* @fires editor:zoom-changed
|
|
1830
1828
|
* Если передавать координаты курсора, то нужно быть аккуратнее, так как юзер может выйти за пределы рабочей области
|
|
1831
1829
|
*/
|
|
1832
|
-
zoom(e =
|
|
1830
|
+
zoom(e = st, t = {}) {
|
|
1833
1831
|
var g, u;
|
|
1834
1832
|
if (!e) return;
|
|
1835
1833
|
const { minZoom: s, maxZoom: n } = this, { canvas: i } = this.editor, a = i.getZoom(), o = i.getCenterPoint(), d = (g = t.pointX) != null ? g : o.x, c = (u = t.pointY) != null ? u : o.y, l = new P(d, c);
|
|
1836
1834
|
let h = Number((a + Number(e)).toFixed(2));
|
|
1837
|
-
h > n && (h = n), h < s && (h = s), i.zoomToPoint(l, h),
|
|
1838
|
-
currentZoom: a,
|
|
1839
|
-
zoom: h,
|
|
1840
|
-
point: l
|
|
1841
|
-
}), i.fire("editor:zoom-changed", {
|
|
1835
|
+
h > n && (h = n), h < s && (h = s), i.zoomToPoint(l, h), i.fire("editor:zoom-changed", {
|
|
1842
1836
|
currentZoom: i.getZoom(),
|
|
1843
1837
|
zoom: h,
|
|
1844
1838
|
point: l
|
|
@@ -1876,7 +1870,7 @@ class ot {
|
|
|
1876
1870
|
* @param options.withoutSave - Не сохранять состояние
|
|
1877
1871
|
* @fires editor:object-rotated
|
|
1878
1872
|
*/
|
|
1879
|
-
rotate(e =
|
|
1873
|
+
rotate(e = nt, { withoutSave: t } = {}) {
|
|
1880
1874
|
const { canvas: s, historyManager: n } = this.editor, i = s.getActiveObject();
|
|
1881
1875
|
if (!i) return;
|
|
1882
1876
|
const a = i.angle + e;
|
|
@@ -2031,7 +2025,7 @@ class ot {
|
|
|
2031
2025
|
});
|
|
2032
2026
|
}
|
|
2033
2027
|
}
|
|
2034
|
-
class
|
|
2028
|
+
class ct {
|
|
2035
2029
|
constructor({ editor: e }) {
|
|
2036
2030
|
this.editor = e, this.isBlocked = !1, this.overlayMask = null, this._createOverlay();
|
|
2037
2031
|
}
|
|
@@ -2214,7 +2208,7 @@ class V {
|
|
|
2214
2208
|
});
|
|
2215
2209
|
}
|
|
2216
2210
|
}
|
|
2217
|
-
class
|
|
2211
|
+
class dt {
|
|
2218
2212
|
/**
|
|
2219
2213
|
* Менеджер фигур для редактора.
|
|
2220
2214
|
* @param options - Опции и настройки менеджера фигур.
|
|
@@ -2254,7 +2248,7 @@ class ct {
|
|
|
2254
2248
|
"height",
|
|
2255
2249
|
"fill"
|
|
2256
2250
|
]);
|
|
2257
|
-
const { canvas: g } = this.editor, u = new
|
|
2251
|
+
const { canvas: g } = this.editor, u = new Ce(y({
|
|
2258
2252
|
id: e,
|
|
2259
2253
|
left: t,
|
|
2260
2254
|
top: s,
|
|
@@ -2294,7 +2288,7 @@ class ct {
|
|
|
2294
2288
|
"radius",
|
|
2295
2289
|
"fill"
|
|
2296
2290
|
]);
|
|
2297
|
-
const { canvas: h } = this.editor, g = new
|
|
2291
|
+
const { canvas: h } = this.editor, g = new Ne(y({
|
|
2298
2292
|
id: e,
|
|
2299
2293
|
left: t,
|
|
2300
2294
|
top: s,
|
|
@@ -2336,7 +2330,7 @@ class ct {
|
|
|
2336
2330
|
"height",
|
|
2337
2331
|
"fill"
|
|
2338
2332
|
]);
|
|
2339
|
-
const { canvas: g } = this.editor, u = new
|
|
2333
|
+
const { canvas: g } = this.editor, u = new De(y({
|
|
2340
2334
|
id: e,
|
|
2341
2335
|
left: t,
|
|
2342
2336
|
top: s,
|
|
@@ -2347,7 +2341,7 @@ class ct {
|
|
|
2347
2341
|
return !t && !s && g.centerObject(u), c || (g.add(u), d || g.setActiveObject(u), g.renderAll()), u;
|
|
2348
2342
|
}
|
|
2349
2343
|
}
|
|
2350
|
-
class
|
|
2344
|
+
class lt {
|
|
2351
2345
|
/**
|
|
2352
2346
|
* @param options
|
|
2353
2347
|
* @param options.editor - экземпляр редактора с доступом к canvas
|
|
@@ -2387,7 +2381,7 @@ class dt {
|
|
|
2387
2381
|
return;
|
|
2388
2382
|
}
|
|
2389
2383
|
if (s.type !== "image") {
|
|
2390
|
-
const g =
|
|
2384
|
+
const g = `${$}${JSON.stringify(s.toObject(["format"]))}`;
|
|
2391
2385
|
navigator.clipboard.writeText(g).catch((u) => {
|
|
2392
2386
|
t.emitWarning({
|
|
2393
2387
|
origin: "ClipboardManager",
|
|
@@ -2404,11 +2398,16 @@ class dt {
|
|
|
2404
2398
|
c[g] = d.charCodeAt(g);
|
|
2405
2399
|
const l = new Blob([c.buffer], { type: a }), h = new ClipboardItem({ [a]: l });
|
|
2406
2400
|
navigator.clipboard.write([h]).catch((g) => {
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2401
|
+
const u = `${$}${JSON.stringify(s.toObject(["format"]))}`;
|
|
2402
|
+
navigator.clipboard.writeText(u).catch((m) => {
|
|
2403
|
+
t.emitError({
|
|
2404
|
+
origin: "ClipboardManager",
|
|
2405
|
+
method: "copy",
|
|
2406
|
+
code: "CLIPBOARD_WRITE_IMAGE_FAILED",
|
|
2407
|
+
// eslint-disable-next-line max-len
|
|
2408
|
+
message: `Ошибка записи изображения в буфер обмена: ${g.message}. Fallback также не удался: ${m.message}`,
|
|
2409
|
+
data: { originalError: g, fallbackError: m }
|
|
2410
|
+
});
|
|
2412
2411
|
});
|
|
2413
2412
|
});
|
|
2414
2413
|
});
|
|
@@ -2421,28 +2420,29 @@ class dt {
|
|
|
2421
2420
|
*/
|
|
2422
2421
|
handlePasteEvent(t) {
|
|
2423
2422
|
return v(this, arguments, function* ({ clipboardData: e }) {
|
|
2424
|
-
var
|
|
2425
|
-
if (!((
|
|
2423
|
+
var c;
|
|
2424
|
+
if (!((c = e == null ? void 0 : e.items) != null && c.length)) {
|
|
2425
|
+
this.paste();
|
|
2426
|
+
return;
|
|
2427
|
+
}
|
|
2426
2428
|
const s = e.getData("text/plain");
|
|
2427
|
-
if (s && s.startsWith(
|
|
2429
|
+
if (s && s.startsWith($)) {
|
|
2428
2430
|
this.paste();
|
|
2429
2431
|
return;
|
|
2430
2432
|
}
|
|
2431
|
-
const { imageManager: n } = this.editor, { items: i } = e, a = i[i.length - 1];
|
|
2432
|
-
if (a.type !== "text/html") {
|
|
2433
|
-
const c = a.getAsFile();
|
|
2434
|
-
if (!c) return;
|
|
2433
|
+
const { imageManager: n } = this.editor, { items: i } = e, a = i[i.length - 1], o = a.getAsFile();
|
|
2434
|
+
if (a.type !== "text/html" && o) {
|
|
2435
2435
|
const l = new FileReader();
|
|
2436
2436
|
l.onload = (h) => {
|
|
2437
2437
|
h.target && this.editor.imageManager.importImage({ source: h.target.result });
|
|
2438
|
-
}, l.readAsDataURL(
|
|
2438
|
+
}, l.readAsDataURL(o);
|
|
2439
2439
|
return;
|
|
2440
2440
|
}
|
|
2441
|
-
const
|
|
2442
|
-
if (
|
|
2443
|
-
const
|
|
2444
|
-
if (
|
|
2445
|
-
n.importImage({ source:
|
|
2441
|
+
const d = e.getData("text/html");
|
|
2442
|
+
if (d) {
|
|
2443
|
+
const g = new DOMParser().parseFromString(d, "text/html").querySelector("img");
|
|
2444
|
+
if (g != null && g.src) {
|
|
2445
|
+
n.importImage({ source: g.src });
|
|
2446
2446
|
return;
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
@@ -2530,10 +2530,10 @@ class G {
|
|
|
2530
2530
|
});
|
|
2531
2531
|
}
|
|
2532
2532
|
static _isGroupOrSelection(e) {
|
|
2533
|
-
return e instanceof p || e instanceof
|
|
2533
|
+
return e instanceof p || e instanceof J;
|
|
2534
2534
|
}
|
|
2535
2535
|
}
|
|
2536
|
-
class
|
|
2536
|
+
class ht {
|
|
2537
2537
|
constructor({ editor: e }) {
|
|
2538
2538
|
this.editor = e;
|
|
2539
2539
|
}
|
|
@@ -2552,7 +2552,7 @@ class lt {
|
|
|
2552
2552
|
n.suspendHistory();
|
|
2553
2553
|
const i = e || s.getActiveObject();
|
|
2554
2554
|
if (!i || !(i instanceof p)) return;
|
|
2555
|
-
const a = i.getObjects(), o = new
|
|
2555
|
+
const a = i.getObjects(), o = new J(a);
|
|
2556
2556
|
a.forEach((d) => s.remove(d)), o.set("id", `${o.type}-${L()}`), s.add(o), s.setActiveObject(o), s.renderAll(), n.resumeHistory(), t || n.saveState(), s.fire("editor:objects-grouped", {
|
|
2557
2557
|
object: i,
|
|
2558
2558
|
group: o,
|
|
@@ -2573,7 +2573,7 @@ class lt {
|
|
|
2573
2573
|
const { canvas: s, historyManager: n } = this.editor;
|
|
2574
2574
|
n.suspendHistory();
|
|
2575
2575
|
const i = e || s.getActiveObject();
|
|
2576
|
-
if (!(i instanceof
|
|
2576
|
+
if (!(i instanceof J)) return;
|
|
2577
2577
|
const a = i.removeAll();
|
|
2578
2578
|
s.remove(i), a.forEach((d) => s.add(d));
|
|
2579
2579
|
const o = new p(a, {
|
|
@@ -2586,7 +2586,7 @@ class lt {
|
|
|
2586
2586
|
});
|
|
2587
2587
|
}
|
|
2588
2588
|
}
|
|
2589
|
-
class
|
|
2589
|
+
class gt {
|
|
2590
2590
|
constructor({ editor: e }) {
|
|
2591
2591
|
this.editor = e;
|
|
2592
2592
|
}
|
|
@@ -2601,7 +2601,7 @@ class ht {
|
|
|
2601
2601
|
i && s.lockObject({ object: a, skipInnerObjects: !0, withoutSave: !0 }), e.setActiveObject(a), e.requestRenderAll(), e.fire("editor:all-objects-selected", { selected: a });
|
|
2602
2602
|
}
|
|
2603
2603
|
}
|
|
2604
|
-
class
|
|
2604
|
+
class ut {
|
|
2605
2605
|
constructor({ editor: e }) {
|
|
2606
2606
|
this.editor = e;
|
|
2607
2607
|
}
|
|
@@ -2629,7 +2629,7 @@ class gt {
|
|
|
2629
2629
|
}));
|
|
2630
2630
|
}
|
|
2631
2631
|
}
|
|
2632
|
-
const
|
|
2632
|
+
const Mt = {
|
|
2633
2633
|
IMAGE_MANAGER: {
|
|
2634
2634
|
/**
|
|
2635
2635
|
* Некорректный Content-Type изображения
|
|
@@ -2770,10 +2770,10 @@ class X {
|
|
|
2770
2770
|
* @returns true, если код допустим, иначе false
|
|
2771
2771
|
*/
|
|
2772
2772
|
static isValidErrorCode(e) {
|
|
2773
|
-
return e ? Object.values(
|
|
2773
|
+
return e ? Object.values(Mt).some((t) => Object.values(t).includes(e)) : !1;
|
|
2774
2774
|
}
|
|
2775
2775
|
}
|
|
2776
|
-
class
|
|
2776
|
+
class ae {
|
|
2777
2777
|
/**
|
|
2778
2778
|
* Конструктор класса ImageEditor.
|
|
2779
2779
|
* @param canvasId - идентификатор канваса, в котором будет создан редактор
|
|
@@ -2801,7 +2801,7 @@ class ie {
|
|
|
2801
2801
|
scaleType: c,
|
|
2802
2802
|
_onReadyCallback: l
|
|
2803
2803
|
} = this.options;
|
|
2804
|
-
if (
|
|
2804
|
+
if (We.apply(), this.canvas = new Le(this.containerId, this.options), this.moduleLoader = new ke(), this.workerManager = new Be(), this.errorManager = new X({ editor: this }), this.historyManager = new qe({ editor: this }), this.toolbar = new Ke({ editor: this }), this.transformManager = new rt({ editor: this }), this.canvasManager = new ot({ editor: this }), this.imageManager = new D({ editor: this }), this.layerManager = new V({ editor: this }), this.shapeManager = new dt({ editor: this }), this.interactionBlocker = new ct({ editor: this }), this.clipboardManager = new lt({ editor: this }), this.objectLockManager = new G({ editor: this }), this.groupingManager = new ht({ editor: this }), this.selectionManager = new gt({ editor: this }), this.deletionManager = new ut({ editor: this }), this._createMontageArea(), this._createClippingArea(), this.listeners = new z({ editor: this, options: this.options }), this.canvasManager.setEditorContainerWidth(e), this.canvasManager.setEditorContainerHeight(t), this.canvasManager.setCanvasWrapperWidth(s), this.canvasManager.setCanvasWrapperHeight(n), this.canvasManager.setCanvasCSSWidth(i), this.canvasManager.setCanvasCSSHeight(a), o != null && o.source) {
|
|
2805
2805
|
const {
|
|
2806
2806
|
source: h,
|
|
2807
2807
|
scale: g = `image-${c}`,
|
|
@@ -2824,7 +2824,7 @@ class ie {
|
|
|
2824
2824
|
this.montageArea = this.shapeManager.addRectangle({
|
|
2825
2825
|
width: e,
|
|
2826
2826
|
height: t,
|
|
2827
|
-
fill:
|
|
2827
|
+
fill: ae._createMosaicPattern(),
|
|
2828
2828
|
stroke: null,
|
|
2829
2829
|
strokeWidth: 0,
|
|
2830
2830
|
selectable: !1,
|
|
@@ -2874,13 +2874,13 @@ class ie {
|
|
|
2874
2874
|
const e = document.createElement("canvas");
|
|
2875
2875
|
e.width = 20, e.height = 20;
|
|
2876
2876
|
const t = e.getContext("2d");
|
|
2877
|
-
return t.fillStyle = "#ddd", t.fillRect(0, 0, 40, 40), t.fillStyle = "#ccc", t.fillRect(0, 0, 10, 10), t.fillRect(10, 10, 10, 10), new
|
|
2877
|
+
return t.fillStyle = "#ddd", t.fillRect(0, 0, 40, 40), t.fillStyle = "#ccc", t.fillRect(0, 0, 10, 10), t.fillRect(10, 10, 10, 10), new we({
|
|
2878
2878
|
source: e,
|
|
2879
2879
|
repeat: "repeat"
|
|
2880
2880
|
});
|
|
2881
2881
|
}
|
|
2882
2882
|
}
|
|
2883
|
-
const
|
|
2883
|
+
const mt = {
|
|
2884
2884
|
/**
|
|
2885
2885
|
* Опции редактора
|
|
2886
2886
|
*/
|
|
@@ -2969,18 +2969,18 @@ const Mt = {
|
|
|
2969
2969
|
resetObjectFitByDoubleClick: !0,
|
|
2970
2970
|
keyboardIgnoreSelectors: []
|
|
2971
2971
|
};
|
|
2972
|
-
function
|
|
2973
|
-
const t = y(y({},
|
|
2972
|
+
function At(r, e = {}) {
|
|
2973
|
+
const t = y(y({}, mt), e), s = document.getElementById(r);
|
|
2974
2974
|
if (!s)
|
|
2975
2975
|
return Promise.reject(new Error(`Контейнер с ID "${r}" не найден.`));
|
|
2976
2976
|
const n = document.createElement("canvas");
|
|
2977
2977
|
return n.id = `${r}-canvas`, s.appendChild(n), t.editorContainer = s, new Promise((i) => {
|
|
2978
2978
|
t._onReadyCallback = i;
|
|
2979
|
-
const a = new
|
|
2979
|
+
const a = new ae(n.id, t);
|
|
2980
2980
|
window[r] = a;
|
|
2981
2981
|
});
|
|
2982
2982
|
}
|
|
2983
2983
|
export {
|
|
2984
|
-
|
|
2984
|
+
At as default
|
|
2985
2985
|
};
|
|
2986
2986
|
//# sourceMappingURL=main.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anu3ev/fabric-image-editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.66",
|
|
4
4
|
"description": "JavaScript image editor 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": [
|