@netless/forge-slide 1.0.3 → 1.0.5
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.js
CHANGED
|
@@ -64121,12 +64121,19 @@ var SelectElementsModel = class extends import_eventemitter33.default {
|
|
|
64121
64121
|
hasEditSelfPermission,
|
|
64122
64122
|
hasEditOthersPermission
|
|
64123
64123
|
} = this;
|
|
64124
|
+
if (!this.requestUserMap(this.userManager.selfId).has(WhiteboardKeys.selectElements)) {
|
|
64125
|
+
return;
|
|
64126
|
+
}
|
|
64124
64127
|
const ids = this.requestUserMap(this.userManager.selfId).get(WhiteboardKeys.selectElements);
|
|
64125
64128
|
const ignoreIds = /* @__PURE__ */ new Set();
|
|
64126
64129
|
for (const userId of this.userManager.userIdList()) {
|
|
64127
64130
|
if (userId !== this.userManager.selfId) {
|
|
64128
|
-
const
|
|
64129
|
-
|
|
64131
|
+
const userMap = this.requestUserMap(userId);
|
|
64132
|
+
if (!userMap.has("trashedElements") || !userMap.has(WhiteboardKeys.selectElements)) {
|
|
64133
|
+
continue;
|
|
64134
|
+
}
|
|
64135
|
+
const trashedIds = userMap.get("trashedElements");
|
|
64136
|
+
const selectedIds = userMap.get(WhiteboardKeys.selectElements);
|
|
64130
64137
|
Array.from(trashedIds.keys()).forEach((key) => ignoreIds.add(key));
|
|
64131
64138
|
Array.from(selectedIds.keys()).forEach((key) => ignoreIds.add(key));
|
|
64132
64139
|
}
|
|
@@ -64150,7 +64157,7 @@ var SelectElementsModel = class extends import_eventemitter33.default {
|
|
|
64150
64157
|
}
|
|
64151
64158
|
clearSelectElementForSelf() {
|
|
64152
64159
|
const ids = this.requestUserMap(this.userManager.selfId).get(WhiteboardKeys.selectElements);
|
|
64153
|
-
ids
|
|
64160
|
+
ids?.doc?.transact(() => {
|
|
64154
64161
|
ids.clear();
|
|
64155
64162
|
ids.set("inner-map-id", WhiteboardKeys.selectElements);
|
|
64156
64163
|
});
|
|
@@ -65806,9 +65813,16 @@ var TrashedElementsModel = class extends import_eventemitter39.default {
|
|
|
65806
65813
|
if (ownerId !== this.userManager.selfId && !this.hasDeleteOthersPermission) {
|
|
65807
65814
|
return;
|
|
65808
65815
|
}
|
|
65816
|
+
if (!this.requestUserMap(this.userManager.selfId).has("trashedElements")) {
|
|
65817
|
+
return;
|
|
65818
|
+
}
|
|
65809
65819
|
const ids = this.requestUserMap(this.userManager.selfId).get("trashedElements");
|
|
65810
65820
|
for (const userId of this.userManager.userIdList()) {
|
|
65811
65821
|
if (userId !== this.userManager.selfId) {
|
|
65822
|
+
const userMap = this.requestUserMap(userId);
|
|
65823
|
+
if (!userMap.has("trashedElements") || !userMap.has(WhiteboardKeys.selectElements)) {
|
|
65824
|
+
continue;
|
|
65825
|
+
}
|
|
65812
65826
|
const trashedIds = this.requestUserMap(userId).get("trashedElements");
|
|
65813
65827
|
const selectedIds = this.requestUserMap(userId).get(WhiteboardKeys.selectElements);
|
|
65814
65828
|
if (selectedIds.has(elementId) || trashedIds.has(elementId)) {
|