@netless/forge-slide 1.0.2 → 1.0.4
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/index.esm.js +17 -3
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +17 -3
- package/dist/index.js.map +2 -2
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -64112,12 +64112,19 @@ var SelectElementsModel = class extends EventEmitter3 {
|
|
|
64112
64112
|
hasEditSelfPermission,
|
|
64113
64113
|
hasEditOthersPermission
|
|
64114
64114
|
} = this;
|
|
64115
|
+
if (!this.requestUserMap(this.userManager.selfId).has(WhiteboardKeys.selectElements)) {
|
|
64116
|
+
return;
|
|
64117
|
+
}
|
|
64115
64118
|
const ids = this.requestUserMap(this.userManager.selfId).get(WhiteboardKeys.selectElements);
|
|
64116
64119
|
const ignoreIds = /* @__PURE__ */ new Set();
|
|
64117
64120
|
for (const userId of this.userManager.userIdList()) {
|
|
64118
64121
|
if (userId !== this.userManager.selfId) {
|
|
64119
|
-
const
|
|
64120
|
-
|
|
64122
|
+
const userMap = this.requestUserMap(userId);
|
|
64123
|
+
if (!userMap.has("trashedElements") || !userMap.has(WhiteboardKeys.selectElements)) {
|
|
64124
|
+
continue;
|
|
64125
|
+
}
|
|
64126
|
+
const trashedIds = userMap.get("trashedElements");
|
|
64127
|
+
const selectedIds = userMap.get(WhiteboardKeys.selectElements);
|
|
64121
64128
|
Array.from(trashedIds.keys()).forEach((key) => ignoreIds.add(key));
|
|
64122
64129
|
Array.from(selectedIds.keys()).forEach((key) => ignoreIds.add(key));
|
|
64123
64130
|
}
|
|
@@ -64141,7 +64148,7 @@ var SelectElementsModel = class extends EventEmitter3 {
|
|
|
64141
64148
|
}
|
|
64142
64149
|
clearSelectElementForSelf() {
|
|
64143
64150
|
const ids = this.requestUserMap(this.userManager.selfId).get(WhiteboardKeys.selectElements);
|
|
64144
|
-
ids
|
|
64151
|
+
ids?.doc?.transact(() => {
|
|
64145
64152
|
ids.clear();
|
|
64146
64153
|
ids.set("inner-map-id", WhiteboardKeys.selectElements);
|
|
64147
64154
|
});
|
|
@@ -65797,9 +65804,16 @@ var TrashedElementsModel = class extends EventEmitter9 {
|
|
|
65797
65804
|
if (ownerId !== this.userManager.selfId && !this.hasDeleteOthersPermission) {
|
|
65798
65805
|
return;
|
|
65799
65806
|
}
|
|
65807
|
+
if (!this.requestUserMap(this.userManager.selfId).has("trashedElements")) {
|
|
65808
|
+
return;
|
|
65809
|
+
}
|
|
65800
65810
|
const ids = this.requestUserMap(this.userManager.selfId).get("trashedElements");
|
|
65801
65811
|
for (const userId of this.userManager.userIdList()) {
|
|
65802
65812
|
if (userId !== this.userManager.selfId) {
|
|
65813
|
+
const userMap = this.requestUserMap(userId);
|
|
65814
|
+
if (!userMap.has("trashedElements") || !userMap.has(WhiteboardKeys.selectElements)) {
|
|
65815
|
+
continue;
|
|
65816
|
+
}
|
|
65803
65817
|
const trashedIds = this.requestUserMap(userId).get("trashedElements");
|
|
65804
65818
|
const selectedIds = this.requestUserMap(userId).get(WhiteboardKeys.selectElements);
|
|
65805
65819
|
if (selectedIds.has(elementId) || trashedIds.has(elementId)) {
|