microboard-temp 0.4.28 → 0.4.29
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/browser.js +86 -84
- package/dist/cjs/index.js +86 -84
- package/dist/cjs/node.js +86 -84
- package/dist/esm/browser.js +86 -84
- package/dist/esm/index.js +86 -84
- package/dist/esm/node.js +86 -84
- package/dist/types/Events/EventsOperations.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -19463,9 +19463,19 @@ class BaseCommand {
|
|
|
19463
19463
|
const items = this.items;
|
|
19464
19464
|
return mapItemsByOperation(items, (item) => {
|
|
19465
19465
|
const op = this.operation;
|
|
19466
|
+
let newData = {};
|
|
19467
|
+
if (op.prevData) {
|
|
19468
|
+
newData = op.prevData;
|
|
19469
|
+
} else {
|
|
19470
|
+
Object.keys(op.newData).forEach((key) => {
|
|
19471
|
+
if (item[key]) {
|
|
19472
|
+
op.newData[key] = item[key];
|
|
19473
|
+
}
|
|
19474
|
+
});
|
|
19475
|
+
}
|
|
19466
19476
|
return {
|
|
19467
19477
|
...op,
|
|
19468
|
-
newData
|
|
19478
|
+
newData
|
|
19469
19479
|
};
|
|
19470
19480
|
});
|
|
19471
19481
|
}
|
|
@@ -50526,93 +50536,85 @@ class BoardSelection {
|
|
|
50526
50536
|
}
|
|
50527
50537
|
}
|
|
50528
50538
|
setStrokeColor(borderColor) {
|
|
50529
|
-
const
|
|
50530
|
-
|
|
50531
|
-
|
|
50532
|
-
|
|
50533
|
-
|
|
50534
|
-
|
|
50535
|
-
|
|
50536
|
-
|
|
50537
|
-
|
|
50538
|
-
|
|
50539
|
-
|
|
50540
|
-
|
|
50541
|
-
|
|
50542
|
-
|
|
50543
|
-
|
|
50544
|
-
|
|
50545
|
-
|
|
50546
|
-
|
|
50547
|
-
|
|
50548
|
-
|
|
50549
|
-
|
|
50550
|
-
|
|
50551
|
-
|
|
50552
|
-
|
|
50553
|
-
|
|
50554
|
-
|
|
50555
|
-
}
|
|
50539
|
+
const operation = {
|
|
50540
|
+
class: "Shape",
|
|
50541
|
+
method: "setBorderColor",
|
|
50542
|
+
item: [],
|
|
50543
|
+
newData: { borderColor }
|
|
50544
|
+
};
|
|
50545
|
+
const operations2 = {};
|
|
50546
|
+
this.items.list().forEach((item) => {
|
|
50547
|
+
if (!operations2[item.itemType]) {
|
|
50548
|
+
const operationCopy = { ...operation };
|
|
50549
|
+
if (item.itemType === "Connector") {
|
|
50550
|
+
operationCopy.method = "setLineColor";
|
|
50551
|
+
operationCopy.lineColor = borderColor;
|
|
50552
|
+
} else if (item.itemType === "Drawing") {
|
|
50553
|
+
operationCopy.method = "setStrokeColor";
|
|
50554
|
+
operationCopy.color = borderColor;
|
|
50555
|
+
} else {
|
|
50556
|
+
operationCopy.borderColor = borderColor;
|
|
50557
|
+
}
|
|
50558
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
50559
|
+
} else {
|
|
50560
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50561
|
+
}
|
|
50562
|
+
});
|
|
50563
|
+
Object.values(operations2).forEach((op) => {
|
|
50564
|
+
this.emit(op);
|
|
50565
|
+
});
|
|
50556
50566
|
}
|
|
50557
50567
|
setStrokeWidth(width2) {
|
|
50558
|
-
const
|
|
50559
|
-
|
|
50560
|
-
|
|
50561
|
-
|
|
50562
|
-
|
|
50563
|
-
|
|
50564
|
-
|
|
50565
|
-
|
|
50566
|
-
|
|
50567
|
-
|
|
50568
|
-
|
|
50569
|
-
|
|
50570
|
-
|
|
50571
|
-
|
|
50572
|
-
|
|
50573
|
-
|
|
50574
|
-
|
|
50575
|
-
|
|
50576
|
-
|
|
50577
|
-
|
|
50578
|
-
|
|
50579
|
-
|
|
50580
|
-
class:
|
|
50581
|
-
|
|
50582
|
-
item
|
|
50583
|
-
|
|
50584
|
-
|
|
50585
|
-
|
|
50586
|
-
|
|
50568
|
+
const operation = {
|
|
50569
|
+
class: "Shape",
|
|
50570
|
+
method: "setStrokeWidth",
|
|
50571
|
+
item: [],
|
|
50572
|
+
width: width2,
|
|
50573
|
+
newData: { width: width2 }
|
|
50574
|
+
};
|
|
50575
|
+
const operations2 = {};
|
|
50576
|
+
this.items.list().forEach((item) => {
|
|
50577
|
+
if (!operations2[item.itemType]) {
|
|
50578
|
+
const operationCopy = { ...operation };
|
|
50579
|
+
if (item.itemType === "Connector") {
|
|
50580
|
+
operationCopy.method = "setLineWidth";
|
|
50581
|
+
operationCopy.lineWidth = width2;
|
|
50582
|
+
} else if (item.itemType === "Drawing") {
|
|
50583
|
+
operationCopy.method = "setStrokeWidth";
|
|
50584
|
+
operationCopy.width = width2;
|
|
50585
|
+
operationCopy.prevWidth = this.getStrokeWidth();
|
|
50586
|
+
} else {
|
|
50587
|
+
operationCopy.borderWidth = width2;
|
|
50588
|
+
operationCopy.prevBorderWidth = this.getStrokeWidth();
|
|
50589
|
+
}
|
|
50590
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
50591
|
+
} else {
|
|
50592
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50593
|
+
}
|
|
50594
|
+
});
|
|
50595
|
+
Object.values(operations2).forEach((op) => {
|
|
50596
|
+
this.emit(op);
|
|
50597
|
+
});
|
|
50587
50598
|
}
|
|
50588
50599
|
setFillColor(backgroundColor) {
|
|
50589
|
-
const
|
|
50590
|
-
|
|
50591
|
-
|
|
50592
|
-
|
|
50593
|
-
|
|
50594
|
-
|
|
50595
|
-
|
|
50596
|
-
|
|
50597
|
-
|
|
50598
|
-
|
|
50599
|
-
|
|
50600
|
-
|
|
50601
|
-
|
|
50602
|
-
|
|
50603
|
-
|
|
50604
|
-
|
|
50605
|
-
|
|
50606
|
-
}
|
|
50607
|
-
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
|
50608
|
-
if (frames.length) {
|
|
50609
|
-
this.emit({
|
|
50610
|
-
class: "Frame",
|
|
50611
|
-
method: "setBackgroundColor",
|
|
50612
|
-
item: frames,
|
|
50613
|
-
backgroundColor
|
|
50614
|
-
});
|
|
50615
|
-
}
|
|
50600
|
+
const operation = {
|
|
50601
|
+
class: "Shape",
|
|
50602
|
+
method: "setBackgroundColor",
|
|
50603
|
+
item: [],
|
|
50604
|
+
backgroundColor,
|
|
50605
|
+
newData: { backgroundColor }
|
|
50606
|
+
};
|
|
50607
|
+
const operations2 = {};
|
|
50608
|
+
this.items.list().forEach((item) => {
|
|
50609
|
+
if (!operations2[item.itemType]) {
|
|
50610
|
+
operations2[item.itemType] = { ...operation, class: item.itemType, item: [item.getId()] };
|
|
50611
|
+
} else {
|
|
50612
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50613
|
+
}
|
|
50614
|
+
});
|
|
50615
|
+
Object.values(operations2).forEach((op) => {
|
|
50616
|
+
this.emit(op);
|
|
50617
|
+
});
|
|
50616
50618
|
}
|
|
50617
50619
|
setCanChangeRatio(canChangeRatio) {
|
|
50618
50620
|
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
package/dist/cjs/index.js
CHANGED
|
@@ -19463,9 +19463,19 @@ class BaseCommand {
|
|
|
19463
19463
|
const items = this.items;
|
|
19464
19464
|
return mapItemsByOperation(items, (item) => {
|
|
19465
19465
|
const op = this.operation;
|
|
19466
|
+
let newData = {};
|
|
19467
|
+
if (op.prevData) {
|
|
19468
|
+
newData = op.prevData;
|
|
19469
|
+
} else {
|
|
19470
|
+
Object.keys(op.newData).forEach((key) => {
|
|
19471
|
+
if (item[key]) {
|
|
19472
|
+
op.newData[key] = item[key];
|
|
19473
|
+
}
|
|
19474
|
+
});
|
|
19475
|
+
}
|
|
19466
19476
|
return {
|
|
19467
19477
|
...op,
|
|
19468
|
-
newData
|
|
19478
|
+
newData
|
|
19469
19479
|
};
|
|
19470
19480
|
});
|
|
19471
19481
|
}
|
|
@@ -50526,93 +50536,85 @@ class BoardSelection {
|
|
|
50526
50536
|
}
|
|
50527
50537
|
}
|
|
50528
50538
|
setStrokeColor(borderColor) {
|
|
50529
|
-
const
|
|
50530
|
-
|
|
50531
|
-
|
|
50532
|
-
|
|
50533
|
-
|
|
50534
|
-
|
|
50535
|
-
|
|
50536
|
-
|
|
50537
|
-
|
|
50538
|
-
|
|
50539
|
-
|
|
50540
|
-
|
|
50541
|
-
|
|
50542
|
-
|
|
50543
|
-
|
|
50544
|
-
|
|
50545
|
-
|
|
50546
|
-
|
|
50547
|
-
|
|
50548
|
-
|
|
50549
|
-
|
|
50550
|
-
|
|
50551
|
-
|
|
50552
|
-
|
|
50553
|
-
|
|
50554
|
-
|
|
50555
|
-
}
|
|
50539
|
+
const operation = {
|
|
50540
|
+
class: "Shape",
|
|
50541
|
+
method: "setBorderColor",
|
|
50542
|
+
item: [],
|
|
50543
|
+
newData: { borderColor }
|
|
50544
|
+
};
|
|
50545
|
+
const operations2 = {};
|
|
50546
|
+
this.items.list().forEach((item) => {
|
|
50547
|
+
if (!operations2[item.itemType]) {
|
|
50548
|
+
const operationCopy = { ...operation };
|
|
50549
|
+
if (item.itemType === "Connector") {
|
|
50550
|
+
operationCopy.method = "setLineColor";
|
|
50551
|
+
operationCopy.lineColor = borderColor;
|
|
50552
|
+
} else if (item.itemType === "Drawing") {
|
|
50553
|
+
operationCopy.method = "setStrokeColor";
|
|
50554
|
+
operationCopy.color = borderColor;
|
|
50555
|
+
} else {
|
|
50556
|
+
operationCopy.borderColor = borderColor;
|
|
50557
|
+
}
|
|
50558
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
50559
|
+
} else {
|
|
50560
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50561
|
+
}
|
|
50562
|
+
});
|
|
50563
|
+
Object.values(operations2).forEach((op) => {
|
|
50564
|
+
this.emit(op);
|
|
50565
|
+
});
|
|
50556
50566
|
}
|
|
50557
50567
|
setStrokeWidth(width2) {
|
|
50558
|
-
const
|
|
50559
|
-
|
|
50560
|
-
|
|
50561
|
-
|
|
50562
|
-
|
|
50563
|
-
|
|
50564
|
-
|
|
50565
|
-
|
|
50566
|
-
|
|
50567
|
-
|
|
50568
|
-
|
|
50569
|
-
|
|
50570
|
-
|
|
50571
|
-
|
|
50572
|
-
|
|
50573
|
-
|
|
50574
|
-
|
|
50575
|
-
|
|
50576
|
-
|
|
50577
|
-
|
|
50578
|
-
|
|
50579
|
-
|
|
50580
|
-
class:
|
|
50581
|
-
|
|
50582
|
-
item
|
|
50583
|
-
|
|
50584
|
-
|
|
50585
|
-
|
|
50586
|
-
|
|
50568
|
+
const operation = {
|
|
50569
|
+
class: "Shape",
|
|
50570
|
+
method: "setStrokeWidth",
|
|
50571
|
+
item: [],
|
|
50572
|
+
width: width2,
|
|
50573
|
+
newData: { width: width2 }
|
|
50574
|
+
};
|
|
50575
|
+
const operations2 = {};
|
|
50576
|
+
this.items.list().forEach((item) => {
|
|
50577
|
+
if (!operations2[item.itemType]) {
|
|
50578
|
+
const operationCopy = { ...operation };
|
|
50579
|
+
if (item.itemType === "Connector") {
|
|
50580
|
+
operationCopy.method = "setLineWidth";
|
|
50581
|
+
operationCopy.lineWidth = width2;
|
|
50582
|
+
} else if (item.itemType === "Drawing") {
|
|
50583
|
+
operationCopy.method = "setStrokeWidth";
|
|
50584
|
+
operationCopy.width = width2;
|
|
50585
|
+
operationCopy.prevWidth = this.getStrokeWidth();
|
|
50586
|
+
} else {
|
|
50587
|
+
operationCopy.borderWidth = width2;
|
|
50588
|
+
operationCopy.prevBorderWidth = this.getStrokeWidth();
|
|
50589
|
+
}
|
|
50590
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
50591
|
+
} else {
|
|
50592
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50593
|
+
}
|
|
50594
|
+
});
|
|
50595
|
+
Object.values(operations2).forEach((op) => {
|
|
50596
|
+
this.emit(op);
|
|
50597
|
+
});
|
|
50587
50598
|
}
|
|
50588
50599
|
setFillColor(backgroundColor) {
|
|
50589
|
-
const
|
|
50590
|
-
|
|
50591
|
-
|
|
50592
|
-
|
|
50593
|
-
|
|
50594
|
-
|
|
50595
|
-
|
|
50596
|
-
|
|
50597
|
-
|
|
50598
|
-
|
|
50599
|
-
|
|
50600
|
-
|
|
50601
|
-
|
|
50602
|
-
|
|
50603
|
-
|
|
50604
|
-
|
|
50605
|
-
|
|
50606
|
-
}
|
|
50607
|
-
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
|
50608
|
-
if (frames.length) {
|
|
50609
|
-
this.emit({
|
|
50610
|
-
class: "Frame",
|
|
50611
|
-
method: "setBackgroundColor",
|
|
50612
|
-
item: frames,
|
|
50613
|
-
backgroundColor
|
|
50614
|
-
});
|
|
50615
|
-
}
|
|
50600
|
+
const operation = {
|
|
50601
|
+
class: "Shape",
|
|
50602
|
+
method: "setBackgroundColor",
|
|
50603
|
+
item: [],
|
|
50604
|
+
backgroundColor,
|
|
50605
|
+
newData: { backgroundColor }
|
|
50606
|
+
};
|
|
50607
|
+
const operations2 = {};
|
|
50608
|
+
this.items.list().forEach((item) => {
|
|
50609
|
+
if (!operations2[item.itemType]) {
|
|
50610
|
+
operations2[item.itemType] = { ...operation, class: item.itemType, item: [item.getId()] };
|
|
50611
|
+
} else {
|
|
50612
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50613
|
+
}
|
|
50614
|
+
});
|
|
50615
|
+
Object.values(operations2).forEach((op) => {
|
|
50616
|
+
this.emit(op);
|
|
50617
|
+
});
|
|
50616
50618
|
}
|
|
50617
50619
|
setCanChangeRatio(canChangeRatio) {
|
|
50618
50620
|
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
package/dist/cjs/node.js
CHANGED
|
@@ -22002,9 +22002,19 @@ class BaseCommand {
|
|
|
22002
22002
|
const items = this.items;
|
|
22003
22003
|
return mapItemsByOperation(items, (item) => {
|
|
22004
22004
|
const op = this.operation;
|
|
22005
|
+
let newData = {};
|
|
22006
|
+
if (op.prevData) {
|
|
22007
|
+
newData = op.prevData;
|
|
22008
|
+
} else {
|
|
22009
|
+
Object.keys(op.newData).forEach((key) => {
|
|
22010
|
+
if (item[key]) {
|
|
22011
|
+
op.newData[key] = item[key];
|
|
22012
|
+
}
|
|
22013
|
+
});
|
|
22014
|
+
}
|
|
22005
22015
|
return {
|
|
22006
22016
|
...op,
|
|
22007
|
-
newData
|
|
22017
|
+
newData
|
|
22008
22018
|
};
|
|
22009
22019
|
});
|
|
22010
22020
|
}
|
|
@@ -53066,93 +53076,85 @@ class BoardSelection {
|
|
|
53066
53076
|
}
|
|
53067
53077
|
}
|
|
53068
53078
|
setStrokeColor(borderColor) {
|
|
53069
|
-
const
|
|
53070
|
-
|
|
53071
|
-
|
|
53072
|
-
|
|
53073
|
-
|
|
53074
|
-
|
|
53075
|
-
|
|
53076
|
-
|
|
53077
|
-
|
|
53078
|
-
|
|
53079
|
-
|
|
53080
|
-
|
|
53081
|
-
|
|
53082
|
-
|
|
53083
|
-
|
|
53084
|
-
|
|
53085
|
-
|
|
53086
|
-
|
|
53087
|
-
|
|
53088
|
-
|
|
53089
|
-
|
|
53090
|
-
|
|
53091
|
-
|
|
53092
|
-
|
|
53093
|
-
|
|
53094
|
-
|
|
53095
|
-
}
|
|
53079
|
+
const operation = {
|
|
53080
|
+
class: "Shape",
|
|
53081
|
+
method: "setBorderColor",
|
|
53082
|
+
item: [],
|
|
53083
|
+
newData: { borderColor }
|
|
53084
|
+
};
|
|
53085
|
+
const operations2 = {};
|
|
53086
|
+
this.items.list().forEach((item) => {
|
|
53087
|
+
if (!operations2[item.itemType]) {
|
|
53088
|
+
const operationCopy = { ...operation };
|
|
53089
|
+
if (item.itemType === "Connector") {
|
|
53090
|
+
operationCopy.method = "setLineColor";
|
|
53091
|
+
operationCopy.lineColor = borderColor;
|
|
53092
|
+
} else if (item.itemType === "Drawing") {
|
|
53093
|
+
operationCopy.method = "setStrokeColor";
|
|
53094
|
+
operationCopy.color = borderColor;
|
|
53095
|
+
} else {
|
|
53096
|
+
operationCopy.borderColor = borderColor;
|
|
53097
|
+
}
|
|
53098
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
53099
|
+
} else {
|
|
53100
|
+
operations2[item.itemType].item.push(item.getId());
|
|
53101
|
+
}
|
|
53102
|
+
});
|
|
53103
|
+
Object.values(operations2).forEach((op) => {
|
|
53104
|
+
this.emit(op);
|
|
53105
|
+
});
|
|
53096
53106
|
}
|
|
53097
53107
|
setStrokeWidth(width2) {
|
|
53098
|
-
const
|
|
53099
|
-
|
|
53100
|
-
|
|
53101
|
-
|
|
53102
|
-
|
|
53103
|
-
|
|
53104
|
-
|
|
53105
|
-
|
|
53106
|
-
|
|
53107
|
-
|
|
53108
|
-
|
|
53109
|
-
|
|
53110
|
-
|
|
53111
|
-
|
|
53112
|
-
|
|
53113
|
-
|
|
53114
|
-
|
|
53115
|
-
|
|
53116
|
-
|
|
53117
|
-
|
|
53118
|
-
|
|
53119
|
-
|
|
53120
|
-
class:
|
|
53121
|
-
|
|
53122
|
-
item
|
|
53123
|
-
|
|
53124
|
-
|
|
53125
|
-
|
|
53126
|
-
|
|
53108
|
+
const operation = {
|
|
53109
|
+
class: "Shape",
|
|
53110
|
+
method: "setStrokeWidth",
|
|
53111
|
+
item: [],
|
|
53112
|
+
width: width2,
|
|
53113
|
+
newData: { width: width2 }
|
|
53114
|
+
};
|
|
53115
|
+
const operations2 = {};
|
|
53116
|
+
this.items.list().forEach((item) => {
|
|
53117
|
+
if (!operations2[item.itemType]) {
|
|
53118
|
+
const operationCopy = { ...operation };
|
|
53119
|
+
if (item.itemType === "Connector") {
|
|
53120
|
+
operationCopy.method = "setLineWidth";
|
|
53121
|
+
operationCopy.lineWidth = width2;
|
|
53122
|
+
} else if (item.itemType === "Drawing") {
|
|
53123
|
+
operationCopy.method = "setStrokeWidth";
|
|
53124
|
+
operationCopy.width = width2;
|
|
53125
|
+
operationCopy.prevWidth = this.getStrokeWidth();
|
|
53126
|
+
} else {
|
|
53127
|
+
operationCopy.borderWidth = width2;
|
|
53128
|
+
operationCopy.prevBorderWidth = this.getStrokeWidth();
|
|
53129
|
+
}
|
|
53130
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
53131
|
+
} else {
|
|
53132
|
+
operations2[item.itemType].item.push(item.getId());
|
|
53133
|
+
}
|
|
53134
|
+
});
|
|
53135
|
+
Object.values(operations2).forEach((op) => {
|
|
53136
|
+
this.emit(op);
|
|
53137
|
+
});
|
|
53127
53138
|
}
|
|
53128
53139
|
setFillColor(backgroundColor) {
|
|
53129
|
-
const
|
|
53130
|
-
|
|
53131
|
-
|
|
53132
|
-
|
|
53133
|
-
|
|
53134
|
-
|
|
53135
|
-
|
|
53136
|
-
|
|
53137
|
-
|
|
53138
|
-
|
|
53139
|
-
|
|
53140
|
-
|
|
53141
|
-
|
|
53142
|
-
|
|
53143
|
-
|
|
53144
|
-
|
|
53145
|
-
|
|
53146
|
-
}
|
|
53147
|
-
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
|
53148
|
-
if (frames.length) {
|
|
53149
|
-
this.emit({
|
|
53150
|
-
class: "Frame",
|
|
53151
|
-
method: "setBackgroundColor",
|
|
53152
|
-
item: frames,
|
|
53153
|
-
backgroundColor
|
|
53154
|
-
});
|
|
53155
|
-
}
|
|
53140
|
+
const operation = {
|
|
53141
|
+
class: "Shape",
|
|
53142
|
+
method: "setBackgroundColor",
|
|
53143
|
+
item: [],
|
|
53144
|
+
backgroundColor,
|
|
53145
|
+
newData: { backgroundColor }
|
|
53146
|
+
};
|
|
53147
|
+
const operations2 = {};
|
|
53148
|
+
this.items.list().forEach((item) => {
|
|
53149
|
+
if (!operations2[item.itemType]) {
|
|
53150
|
+
operations2[item.itemType] = { ...operation, class: item.itemType, item: [item.getId()] };
|
|
53151
|
+
} else {
|
|
53152
|
+
operations2[item.itemType].item.push(item.getId());
|
|
53153
|
+
}
|
|
53154
|
+
});
|
|
53155
|
+
Object.values(operations2).forEach((op) => {
|
|
53156
|
+
this.emit(op);
|
|
53157
|
+
});
|
|
53156
53158
|
}
|
|
53157
53159
|
setCanChangeRatio(canChangeRatio) {
|
|
53158
53160
|
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
package/dist/esm/browser.js
CHANGED
|
@@ -19313,9 +19313,19 @@ class BaseCommand {
|
|
|
19313
19313
|
const items = this.items;
|
|
19314
19314
|
return mapItemsByOperation(items, (item) => {
|
|
19315
19315
|
const op = this.operation;
|
|
19316
|
+
let newData = {};
|
|
19317
|
+
if (op.prevData) {
|
|
19318
|
+
newData = op.prevData;
|
|
19319
|
+
} else {
|
|
19320
|
+
Object.keys(op.newData).forEach((key) => {
|
|
19321
|
+
if (item[key]) {
|
|
19322
|
+
op.newData[key] = item[key];
|
|
19323
|
+
}
|
|
19324
|
+
});
|
|
19325
|
+
}
|
|
19316
19326
|
return {
|
|
19317
19327
|
...op,
|
|
19318
|
-
newData
|
|
19328
|
+
newData
|
|
19319
19329
|
};
|
|
19320
19330
|
});
|
|
19321
19331
|
}
|
|
@@ -50376,93 +50386,85 @@ class BoardSelection {
|
|
|
50376
50386
|
}
|
|
50377
50387
|
}
|
|
50378
50388
|
setStrokeColor(borderColor) {
|
|
50379
|
-
const
|
|
50380
|
-
|
|
50381
|
-
|
|
50382
|
-
|
|
50383
|
-
|
|
50384
|
-
|
|
50385
|
-
|
|
50386
|
-
|
|
50387
|
-
|
|
50388
|
-
|
|
50389
|
-
|
|
50390
|
-
|
|
50391
|
-
|
|
50392
|
-
|
|
50393
|
-
|
|
50394
|
-
|
|
50395
|
-
|
|
50396
|
-
|
|
50397
|
-
|
|
50398
|
-
|
|
50399
|
-
|
|
50400
|
-
|
|
50401
|
-
|
|
50402
|
-
|
|
50403
|
-
|
|
50404
|
-
|
|
50405
|
-
}
|
|
50389
|
+
const operation = {
|
|
50390
|
+
class: "Shape",
|
|
50391
|
+
method: "setBorderColor",
|
|
50392
|
+
item: [],
|
|
50393
|
+
newData: { borderColor }
|
|
50394
|
+
};
|
|
50395
|
+
const operations2 = {};
|
|
50396
|
+
this.items.list().forEach((item) => {
|
|
50397
|
+
if (!operations2[item.itemType]) {
|
|
50398
|
+
const operationCopy = { ...operation };
|
|
50399
|
+
if (item.itemType === "Connector") {
|
|
50400
|
+
operationCopy.method = "setLineColor";
|
|
50401
|
+
operationCopy.lineColor = borderColor;
|
|
50402
|
+
} else if (item.itemType === "Drawing") {
|
|
50403
|
+
operationCopy.method = "setStrokeColor";
|
|
50404
|
+
operationCopy.color = borderColor;
|
|
50405
|
+
} else {
|
|
50406
|
+
operationCopy.borderColor = borderColor;
|
|
50407
|
+
}
|
|
50408
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
50409
|
+
} else {
|
|
50410
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50411
|
+
}
|
|
50412
|
+
});
|
|
50413
|
+
Object.values(operations2).forEach((op) => {
|
|
50414
|
+
this.emit(op);
|
|
50415
|
+
});
|
|
50406
50416
|
}
|
|
50407
50417
|
setStrokeWidth(width2) {
|
|
50408
|
-
const
|
|
50409
|
-
|
|
50410
|
-
|
|
50411
|
-
|
|
50412
|
-
|
|
50413
|
-
|
|
50414
|
-
|
|
50415
|
-
|
|
50416
|
-
|
|
50417
|
-
|
|
50418
|
-
|
|
50419
|
-
|
|
50420
|
-
|
|
50421
|
-
|
|
50422
|
-
|
|
50423
|
-
|
|
50424
|
-
|
|
50425
|
-
|
|
50426
|
-
|
|
50427
|
-
|
|
50428
|
-
|
|
50429
|
-
|
|
50430
|
-
class:
|
|
50431
|
-
|
|
50432
|
-
item
|
|
50433
|
-
|
|
50434
|
-
|
|
50435
|
-
|
|
50436
|
-
|
|
50418
|
+
const operation = {
|
|
50419
|
+
class: "Shape",
|
|
50420
|
+
method: "setStrokeWidth",
|
|
50421
|
+
item: [],
|
|
50422
|
+
width: width2,
|
|
50423
|
+
newData: { width: width2 }
|
|
50424
|
+
};
|
|
50425
|
+
const operations2 = {};
|
|
50426
|
+
this.items.list().forEach((item) => {
|
|
50427
|
+
if (!operations2[item.itemType]) {
|
|
50428
|
+
const operationCopy = { ...operation };
|
|
50429
|
+
if (item.itemType === "Connector") {
|
|
50430
|
+
operationCopy.method = "setLineWidth";
|
|
50431
|
+
operationCopy.lineWidth = width2;
|
|
50432
|
+
} else if (item.itemType === "Drawing") {
|
|
50433
|
+
operationCopy.method = "setStrokeWidth";
|
|
50434
|
+
operationCopy.width = width2;
|
|
50435
|
+
operationCopy.prevWidth = this.getStrokeWidth();
|
|
50436
|
+
} else {
|
|
50437
|
+
operationCopy.borderWidth = width2;
|
|
50438
|
+
operationCopy.prevBorderWidth = this.getStrokeWidth();
|
|
50439
|
+
}
|
|
50440
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
50441
|
+
} else {
|
|
50442
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50443
|
+
}
|
|
50444
|
+
});
|
|
50445
|
+
Object.values(operations2).forEach((op) => {
|
|
50446
|
+
this.emit(op);
|
|
50447
|
+
});
|
|
50437
50448
|
}
|
|
50438
50449
|
setFillColor(backgroundColor) {
|
|
50439
|
-
const
|
|
50440
|
-
|
|
50441
|
-
|
|
50442
|
-
|
|
50443
|
-
|
|
50444
|
-
|
|
50445
|
-
|
|
50446
|
-
|
|
50447
|
-
|
|
50448
|
-
|
|
50449
|
-
|
|
50450
|
-
|
|
50451
|
-
|
|
50452
|
-
|
|
50453
|
-
|
|
50454
|
-
|
|
50455
|
-
|
|
50456
|
-
}
|
|
50457
|
-
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
|
50458
|
-
if (frames.length) {
|
|
50459
|
-
this.emit({
|
|
50460
|
-
class: "Frame",
|
|
50461
|
-
method: "setBackgroundColor",
|
|
50462
|
-
item: frames,
|
|
50463
|
-
backgroundColor
|
|
50464
|
-
});
|
|
50465
|
-
}
|
|
50450
|
+
const operation = {
|
|
50451
|
+
class: "Shape",
|
|
50452
|
+
method: "setBackgroundColor",
|
|
50453
|
+
item: [],
|
|
50454
|
+
backgroundColor,
|
|
50455
|
+
newData: { backgroundColor }
|
|
50456
|
+
};
|
|
50457
|
+
const operations2 = {};
|
|
50458
|
+
this.items.list().forEach((item) => {
|
|
50459
|
+
if (!operations2[item.itemType]) {
|
|
50460
|
+
operations2[item.itemType] = { ...operation, class: item.itemType, item: [item.getId()] };
|
|
50461
|
+
} else {
|
|
50462
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50463
|
+
}
|
|
50464
|
+
});
|
|
50465
|
+
Object.values(operations2).forEach((op) => {
|
|
50466
|
+
this.emit(op);
|
|
50467
|
+
});
|
|
50466
50468
|
}
|
|
50467
50469
|
setCanChangeRatio(canChangeRatio) {
|
|
50468
50470
|
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
package/dist/esm/index.js
CHANGED
|
@@ -19306,9 +19306,19 @@ class BaseCommand {
|
|
|
19306
19306
|
const items = this.items;
|
|
19307
19307
|
return mapItemsByOperation(items, (item) => {
|
|
19308
19308
|
const op = this.operation;
|
|
19309
|
+
let newData = {};
|
|
19310
|
+
if (op.prevData) {
|
|
19311
|
+
newData = op.prevData;
|
|
19312
|
+
} else {
|
|
19313
|
+
Object.keys(op.newData).forEach((key) => {
|
|
19314
|
+
if (item[key]) {
|
|
19315
|
+
op.newData[key] = item[key];
|
|
19316
|
+
}
|
|
19317
|
+
});
|
|
19318
|
+
}
|
|
19309
19319
|
return {
|
|
19310
19320
|
...op,
|
|
19311
|
-
newData
|
|
19321
|
+
newData
|
|
19312
19322
|
};
|
|
19313
19323
|
});
|
|
19314
19324
|
}
|
|
@@ -50369,93 +50379,85 @@ class BoardSelection {
|
|
|
50369
50379
|
}
|
|
50370
50380
|
}
|
|
50371
50381
|
setStrokeColor(borderColor) {
|
|
50372
|
-
const
|
|
50373
|
-
|
|
50374
|
-
|
|
50375
|
-
|
|
50376
|
-
|
|
50377
|
-
|
|
50378
|
-
|
|
50379
|
-
|
|
50380
|
-
|
|
50381
|
-
|
|
50382
|
-
|
|
50383
|
-
|
|
50384
|
-
|
|
50385
|
-
|
|
50386
|
-
|
|
50387
|
-
|
|
50388
|
-
|
|
50389
|
-
|
|
50390
|
-
|
|
50391
|
-
|
|
50392
|
-
|
|
50393
|
-
|
|
50394
|
-
|
|
50395
|
-
|
|
50396
|
-
|
|
50397
|
-
|
|
50398
|
-
}
|
|
50382
|
+
const operation = {
|
|
50383
|
+
class: "Shape",
|
|
50384
|
+
method: "setBorderColor",
|
|
50385
|
+
item: [],
|
|
50386
|
+
newData: { borderColor }
|
|
50387
|
+
};
|
|
50388
|
+
const operations2 = {};
|
|
50389
|
+
this.items.list().forEach((item) => {
|
|
50390
|
+
if (!operations2[item.itemType]) {
|
|
50391
|
+
const operationCopy = { ...operation };
|
|
50392
|
+
if (item.itemType === "Connector") {
|
|
50393
|
+
operationCopy.method = "setLineColor";
|
|
50394
|
+
operationCopy.lineColor = borderColor;
|
|
50395
|
+
} else if (item.itemType === "Drawing") {
|
|
50396
|
+
operationCopy.method = "setStrokeColor";
|
|
50397
|
+
operationCopy.color = borderColor;
|
|
50398
|
+
} else {
|
|
50399
|
+
operationCopy.borderColor = borderColor;
|
|
50400
|
+
}
|
|
50401
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
50402
|
+
} else {
|
|
50403
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50404
|
+
}
|
|
50405
|
+
});
|
|
50406
|
+
Object.values(operations2).forEach((op) => {
|
|
50407
|
+
this.emit(op);
|
|
50408
|
+
});
|
|
50399
50409
|
}
|
|
50400
50410
|
setStrokeWidth(width2) {
|
|
50401
|
-
const
|
|
50402
|
-
|
|
50403
|
-
|
|
50404
|
-
|
|
50405
|
-
|
|
50406
|
-
|
|
50407
|
-
|
|
50408
|
-
|
|
50409
|
-
|
|
50410
|
-
|
|
50411
|
-
|
|
50412
|
-
|
|
50413
|
-
|
|
50414
|
-
|
|
50415
|
-
|
|
50416
|
-
|
|
50417
|
-
|
|
50418
|
-
|
|
50419
|
-
|
|
50420
|
-
|
|
50421
|
-
|
|
50422
|
-
|
|
50423
|
-
class:
|
|
50424
|
-
|
|
50425
|
-
item
|
|
50426
|
-
|
|
50427
|
-
|
|
50428
|
-
|
|
50429
|
-
|
|
50411
|
+
const operation = {
|
|
50412
|
+
class: "Shape",
|
|
50413
|
+
method: "setStrokeWidth",
|
|
50414
|
+
item: [],
|
|
50415
|
+
width: width2,
|
|
50416
|
+
newData: { width: width2 }
|
|
50417
|
+
};
|
|
50418
|
+
const operations2 = {};
|
|
50419
|
+
this.items.list().forEach((item) => {
|
|
50420
|
+
if (!operations2[item.itemType]) {
|
|
50421
|
+
const operationCopy = { ...operation };
|
|
50422
|
+
if (item.itemType === "Connector") {
|
|
50423
|
+
operationCopy.method = "setLineWidth";
|
|
50424
|
+
operationCopy.lineWidth = width2;
|
|
50425
|
+
} else if (item.itemType === "Drawing") {
|
|
50426
|
+
operationCopy.method = "setStrokeWidth";
|
|
50427
|
+
operationCopy.width = width2;
|
|
50428
|
+
operationCopy.prevWidth = this.getStrokeWidth();
|
|
50429
|
+
} else {
|
|
50430
|
+
operationCopy.borderWidth = width2;
|
|
50431
|
+
operationCopy.prevBorderWidth = this.getStrokeWidth();
|
|
50432
|
+
}
|
|
50433
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
50434
|
+
} else {
|
|
50435
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50436
|
+
}
|
|
50437
|
+
});
|
|
50438
|
+
Object.values(operations2).forEach((op) => {
|
|
50439
|
+
this.emit(op);
|
|
50440
|
+
});
|
|
50430
50441
|
}
|
|
50431
50442
|
setFillColor(backgroundColor) {
|
|
50432
|
-
const
|
|
50433
|
-
|
|
50434
|
-
|
|
50435
|
-
|
|
50436
|
-
|
|
50437
|
-
|
|
50438
|
-
|
|
50439
|
-
|
|
50440
|
-
|
|
50441
|
-
|
|
50442
|
-
|
|
50443
|
-
|
|
50444
|
-
|
|
50445
|
-
|
|
50446
|
-
|
|
50447
|
-
|
|
50448
|
-
|
|
50449
|
-
}
|
|
50450
|
-
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
|
50451
|
-
if (frames.length) {
|
|
50452
|
-
this.emit({
|
|
50453
|
-
class: "Frame",
|
|
50454
|
-
method: "setBackgroundColor",
|
|
50455
|
-
item: frames,
|
|
50456
|
-
backgroundColor
|
|
50457
|
-
});
|
|
50458
|
-
}
|
|
50443
|
+
const operation = {
|
|
50444
|
+
class: "Shape",
|
|
50445
|
+
method: "setBackgroundColor",
|
|
50446
|
+
item: [],
|
|
50447
|
+
backgroundColor,
|
|
50448
|
+
newData: { backgroundColor }
|
|
50449
|
+
};
|
|
50450
|
+
const operations2 = {};
|
|
50451
|
+
this.items.list().forEach((item) => {
|
|
50452
|
+
if (!operations2[item.itemType]) {
|
|
50453
|
+
operations2[item.itemType] = { ...operation, class: item.itemType, item: [item.getId()] };
|
|
50454
|
+
} else {
|
|
50455
|
+
operations2[item.itemType].item.push(item.getId());
|
|
50456
|
+
}
|
|
50457
|
+
});
|
|
50458
|
+
Object.values(operations2).forEach((op) => {
|
|
50459
|
+
this.emit(op);
|
|
50460
|
+
});
|
|
50459
50461
|
}
|
|
50460
50462
|
setCanChangeRatio(canChangeRatio) {
|
|
50461
50463
|
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
package/dist/esm/node.js
CHANGED
|
@@ -21840,9 +21840,19 @@ class BaseCommand {
|
|
|
21840
21840
|
const items = this.items;
|
|
21841
21841
|
return mapItemsByOperation(items, (item) => {
|
|
21842
21842
|
const op = this.operation;
|
|
21843
|
+
let newData = {};
|
|
21844
|
+
if (op.prevData) {
|
|
21845
|
+
newData = op.prevData;
|
|
21846
|
+
} else {
|
|
21847
|
+
Object.keys(op.newData).forEach((key) => {
|
|
21848
|
+
if (item[key]) {
|
|
21849
|
+
op.newData[key] = item[key];
|
|
21850
|
+
}
|
|
21851
|
+
});
|
|
21852
|
+
}
|
|
21843
21853
|
return {
|
|
21844
21854
|
...op,
|
|
21845
|
-
newData
|
|
21855
|
+
newData
|
|
21846
21856
|
};
|
|
21847
21857
|
});
|
|
21848
21858
|
}
|
|
@@ -52904,93 +52914,85 @@ class BoardSelection {
|
|
|
52904
52914
|
}
|
|
52905
52915
|
}
|
|
52906
52916
|
setStrokeColor(borderColor) {
|
|
52907
|
-
const
|
|
52908
|
-
|
|
52909
|
-
|
|
52910
|
-
|
|
52911
|
-
|
|
52912
|
-
|
|
52913
|
-
|
|
52914
|
-
|
|
52915
|
-
|
|
52916
|
-
|
|
52917
|
-
|
|
52918
|
-
|
|
52919
|
-
|
|
52920
|
-
|
|
52921
|
-
|
|
52922
|
-
|
|
52923
|
-
|
|
52924
|
-
|
|
52925
|
-
|
|
52926
|
-
|
|
52927
|
-
|
|
52928
|
-
|
|
52929
|
-
|
|
52930
|
-
|
|
52931
|
-
|
|
52932
|
-
|
|
52933
|
-
}
|
|
52917
|
+
const operation = {
|
|
52918
|
+
class: "Shape",
|
|
52919
|
+
method: "setBorderColor",
|
|
52920
|
+
item: [],
|
|
52921
|
+
newData: { borderColor }
|
|
52922
|
+
};
|
|
52923
|
+
const operations2 = {};
|
|
52924
|
+
this.items.list().forEach((item) => {
|
|
52925
|
+
if (!operations2[item.itemType]) {
|
|
52926
|
+
const operationCopy = { ...operation };
|
|
52927
|
+
if (item.itemType === "Connector") {
|
|
52928
|
+
operationCopy.method = "setLineColor";
|
|
52929
|
+
operationCopy.lineColor = borderColor;
|
|
52930
|
+
} else if (item.itemType === "Drawing") {
|
|
52931
|
+
operationCopy.method = "setStrokeColor";
|
|
52932
|
+
operationCopy.color = borderColor;
|
|
52933
|
+
} else {
|
|
52934
|
+
operationCopy.borderColor = borderColor;
|
|
52935
|
+
}
|
|
52936
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
52937
|
+
} else {
|
|
52938
|
+
operations2[item.itemType].item.push(item.getId());
|
|
52939
|
+
}
|
|
52940
|
+
});
|
|
52941
|
+
Object.values(operations2).forEach((op) => {
|
|
52942
|
+
this.emit(op);
|
|
52943
|
+
});
|
|
52934
52944
|
}
|
|
52935
52945
|
setStrokeWidth(width2) {
|
|
52936
|
-
const
|
|
52937
|
-
|
|
52938
|
-
|
|
52939
|
-
|
|
52940
|
-
|
|
52941
|
-
|
|
52942
|
-
|
|
52943
|
-
|
|
52944
|
-
|
|
52945
|
-
|
|
52946
|
-
|
|
52947
|
-
|
|
52948
|
-
|
|
52949
|
-
|
|
52950
|
-
|
|
52951
|
-
|
|
52952
|
-
|
|
52953
|
-
|
|
52954
|
-
|
|
52955
|
-
|
|
52956
|
-
|
|
52957
|
-
|
|
52958
|
-
class:
|
|
52959
|
-
|
|
52960
|
-
item
|
|
52961
|
-
|
|
52962
|
-
|
|
52963
|
-
|
|
52964
|
-
|
|
52946
|
+
const operation = {
|
|
52947
|
+
class: "Shape",
|
|
52948
|
+
method: "setStrokeWidth",
|
|
52949
|
+
item: [],
|
|
52950
|
+
width: width2,
|
|
52951
|
+
newData: { width: width2 }
|
|
52952
|
+
};
|
|
52953
|
+
const operations2 = {};
|
|
52954
|
+
this.items.list().forEach((item) => {
|
|
52955
|
+
if (!operations2[item.itemType]) {
|
|
52956
|
+
const operationCopy = { ...operation };
|
|
52957
|
+
if (item.itemType === "Connector") {
|
|
52958
|
+
operationCopy.method = "setLineWidth";
|
|
52959
|
+
operationCopy.lineWidth = width2;
|
|
52960
|
+
} else if (item.itemType === "Drawing") {
|
|
52961
|
+
operationCopy.method = "setStrokeWidth";
|
|
52962
|
+
operationCopy.width = width2;
|
|
52963
|
+
operationCopy.prevWidth = this.getStrokeWidth();
|
|
52964
|
+
} else {
|
|
52965
|
+
operationCopy.borderWidth = width2;
|
|
52966
|
+
operationCopy.prevBorderWidth = this.getStrokeWidth();
|
|
52967
|
+
}
|
|
52968
|
+
operations2[item.itemType] = { ...operationCopy, class: item.itemType, item: [item.getId()] };
|
|
52969
|
+
} else {
|
|
52970
|
+
operations2[item.itemType].item.push(item.getId());
|
|
52971
|
+
}
|
|
52972
|
+
});
|
|
52973
|
+
Object.values(operations2).forEach((op) => {
|
|
52974
|
+
this.emit(op);
|
|
52975
|
+
});
|
|
52965
52976
|
}
|
|
52966
52977
|
setFillColor(backgroundColor) {
|
|
52967
|
-
const
|
|
52968
|
-
|
|
52969
|
-
|
|
52970
|
-
|
|
52971
|
-
|
|
52972
|
-
|
|
52973
|
-
|
|
52974
|
-
|
|
52975
|
-
|
|
52976
|
-
|
|
52977
|
-
|
|
52978
|
-
|
|
52979
|
-
|
|
52980
|
-
|
|
52981
|
-
|
|
52982
|
-
|
|
52983
|
-
|
|
52984
|
-
}
|
|
52985
|
-
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
|
52986
|
-
if (frames.length) {
|
|
52987
|
-
this.emit({
|
|
52988
|
-
class: "Frame",
|
|
52989
|
-
method: "setBackgroundColor",
|
|
52990
|
-
item: frames,
|
|
52991
|
-
backgroundColor
|
|
52992
|
-
});
|
|
52993
|
-
}
|
|
52978
|
+
const operation = {
|
|
52979
|
+
class: "Shape",
|
|
52980
|
+
method: "setBackgroundColor",
|
|
52981
|
+
item: [],
|
|
52982
|
+
backgroundColor,
|
|
52983
|
+
newData: { backgroundColor }
|
|
52984
|
+
};
|
|
52985
|
+
const operations2 = {};
|
|
52986
|
+
this.items.list().forEach((item) => {
|
|
52987
|
+
if (!operations2[item.itemType]) {
|
|
52988
|
+
operations2[item.itemType] = { ...operation, class: item.itemType, item: [item.getId()] };
|
|
52989
|
+
} else {
|
|
52990
|
+
operations2[item.itemType].item.push(item.getId());
|
|
52991
|
+
}
|
|
52992
|
+
});
|
|
52993
|
+
Object.values(operations2).forEach((op) => {
|
|
52994
|
+
this.emit(op);
|
|
52995
|
+
});
|
|
52994
52996
|
}
|
|
52995
52997
|
setCanChangeRatio(canChangeRatio) {
|
|
52996
52998
|
const frames = this.items.getIdsByItemTypes(["Frame"]);
|
|
@@ -29,7 +29,7 @@ export interface BaseOperation<T extends Record<string, unknown> = {}> {
|
|
|
29
29
|
item: string[];
|
|
30
30
|
method: string;
|
|
31
31
|
newData: T;
|
|
32
|
-
prevData
|
|
32
|
+
prevData?: T;
|
|
33
33
|
}
|
|
34
34
|
export type ItemOperation = LinkToOperation | TransformationOperation | ShapeOperation | StickerOperation | RichTextOperation | ConnectorOperation | DrawingOperation | FrameOperation | PlaceholderOperation | GroupOperation | CommentOperation | ImageOperation | VideoOperation | AudioOperation;
|
|
35
35
|
export type UndoableOperation = BoardOps | ItemOperation;
|