@netless/forge-slide 1.0.1 → 1.0.3

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.js CHANGED
@@ -66777,7 +66777,7 @@ var AsyncMap = class {
66777
66777
  if (!window.__forge_gl_wb_status__) {
66778
66778
  window.__forge_gl_wb_status__ = new AsyncMap();
66779
66779
  }
66780
- var WhiteboardApplication = class extends import_forge_room.AbstractApplication {
66780
+ var WhiteboardApplication = class _WhiteboardApplication extends import_forge_room.AbstractApplication {
66781
66781
  get undoManager() {
66782
66782
  const page = this.pageModel.getCurrentPage(this.userId);
66783
66783
  if (page) {
@@ -67334,9 +67334,11 @@ var WhiteboardApplication = class extends import_forge_room.AbstractApplication
67334
67334
  this.liveCursor.showLiveCursor = value;
67335
67335
  };
67336
67336
  this.emitter.updateViewport = (width, height) => {
67337
+ (0, import_forge_room.log)(`call updateViewport with width: ${width}, height: ${height}`);
67337
67338
  this.updateOptionSize(width, height);
67338
67339
  };
67339
67340
  this.emitter.__setMainCanvasVisible = (visible) => {
67341
+ (0, import_forge_room.log)(`call __setMainCanvasVisible with visible: ${visible}`);
67340
67342
  this.canvasElement.style.opacity = visible ? "1" : "0";
67341
67343
  };
67342
67344
  this.emitter.on("error", (errorCode, errorMessage) => {
@@ -67350,6 +67352,7 @@ var WhiteboardApplication = class extends import_forge_room.AbstractApplication
67350
67352
  return that.delayTranslateOut;
67351
67353
  },
67352
67354
  set(value) {
67355
+ (0, import_forge_room.log)(`call __delayTranslateOut with value: ${value}`);
67353
67356
  that.delayTranslateOut = value;
67354
67357
  }
67355
67358
  });
@@ -67447,6 +67450,8 @@ var WhiteboardApplication = class extends import_forge_room.AbstractApplication
67447
67450
  return this.getMap(`user/${userId}`);
67448
67451
  }
67449
67452
  async initialize(option) {
67453
+ _WhiteboardApplication.instanceCount.set(this.appId, (_WhiteboardApplication.instanceCount.get(this.appId) ?? 0) + 1);
67454
+ (0, import_forge_room.log)(`whiteboard ${this.appId} initialize. instance count: ${_WhiteboardApplication.instanceCount.get(this.appId) ?? 0}`, {}, "info");
67450
67455
  this.permissions = new WhiteboardPermissions(this.userManager, (userId) => {
67451
67456
  return this.userMap(userId);
67452
67457
  });
@@ -67803,6 +67808,7 @@ var WhiteboardApplication = class extends import_forge_room.AbstractApplication
67803
67808
  this.camera.updateInitSize(new import_paper.default.Size(width, height));
67804
67809
  }
67805
67810
  async dispose(removeSubDoc) {
67811
+ _WhiteboardApplication.instanceCount.set(this.appId, (_WhiteboardApplication.instanceCount.get(this.appId) ?? 0) - 1);
67806
67812
  if (removeSubDoc) {
67807
67813
  this.deleteSubDoc(this.appId);
67808
67814
  }
@@ -67835,8 +67841,10 @@ var WhiteboardApplication = class extends import_forge_room.AbstractApplication
67835
67841
  this.emitter.indexedNavigation.dispose();
67836
67842
  this.permissions.dispose();
67837
67843
  (0, import_forge_room13.removeObserver)(this.userMap(this.userId), this.handleSyncedWhiteboardStatusChange);
67844
+ (0, import_forge_room.log)(`whiteboard ${this.appId} disposed. instance count: ${_WhiteboardApplication.instanceCount.get(this.appId) ?? 0}`, {}, "info");
67838
67845
  }
67839
67846
  };
67847
+ _defineProperty43(WhiteboardApplication, "instanceCount", /* @__PURE__ */ new Map());
67840
67848
  _defineProperty43(WhiteboardApplication, "applicationName", WHITEBOARD_APP_NAME);
67841
67849
 
67842
67850
  // src/SlideApplication.ts