@netless/forge-whiteboard 0.1.1 → 0.1.2
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/whiteboard.js
CHANGED
|
@@ -25378,6 +25378,7 @@ var Y15 = __toESM(require("yjs"), 1);
|
|
|
25378
25378
|
// src/model/RenderableModel.ts
|
|
25379
25379
|
var Y12 = __toESM(require("yjs"), 1);
|
|
25380
25380
|
var import_eventemitter32 = __toESM(require("eventemitter3"), 1);
|
|
25381
|
+
var import_uuid = require("uuid");
|
|
25381
25382
|
|
|
25382
25383
|
// src/model/renderable/CurveModel.ts
|
|
25383
25384
|
var Y2 = __toESM(require("yjs"), 1);
|
|
@@ -27113,21 +27114,7 @@ var RenderableModel = class extends import_eventemitter32.default {
|
|
|
27113
27114
|
hasPermission;
|
|
27114
27115
|
shadowEmitter;
|
|
27115
27116
|
get uuid() {
|
|
27116
|
-
|
|
27117
|
-
const existKeys = Array.from(this.elements.keys());
|
|
27118
|
-
if (map && map instanceof Map) {
|
|
27119
|
-
const historyKeys = Array.from(map.keys());
|
|
27120
|
-
for (const key of historyKeys) {
|
|
27121
|
-
if (existKeys.indexOf(key) < 0) {
|
|
27122
|
-
return key;
|
|
27123
|
-
}
|
|
27124
|
-
}
|
|
27125
|
-
}
|
|
27126
|
-
let id = Math.random().toString(32).substring(2, 5);
|
|
27127
|
-
while (existKeys.indexOf(id) >= 0) {
|
|
27128
|
-
id = Math.random().toString(32).substring(2, 5);
|
|
27129
|
-
}
|
|
27130
|
-
return id;
|
|
27117
|
+
return (0, import_uuid.v4)();
|
|
27131
27118
|
}
|
|
27132
27119
|
constructor(layerId, shadowEmitter, elements, scope, toolbarModel, userManager, hasPermission) {
|
|
27133
27120
|
super();
|