@netless/forge-whiteboard 0.1.2 → 0.1.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.
@@ -25372,8 +25372,8 @@ module.exports = __toCommonJS(src_exports);
25372
25372
 
25373
25373
  // src/WhiteboardApplication.ts
25374
25374
  var import_forge_room3 = require("@netless/forge-room");
25375
- var import_paper = __toESM(require_paper_full(), 1);
25376
25375
  var Y15 = __toESM(require("yjs"), 1);
25376
+ var import_paper = __toESM(require_paper_full(), 1);
25377
25377
 
25378
25378
  // src/model/RenderableModel.ts
25379
25379
  var Y12 = __toESM(require("yjs"), 1);
@@ -30316,10 +30316,12 @@ var WhiteboardApplication = class extends import_forge_room3.AbstractApplication
30316
30316
  this.shadowScope.settings.insertItems = false;
30317
30317
  this.resizeObserver = new ResizeObserver(() => {
30318
30318
  const rootBounds = this.rootElement.getBoundingClientRect();
30319
- let width = rootBounds.width;
30319
+ const minWidth = Math.max(rootBounds.width, 10);
30320
+ const minHeight = Math.max(rootBounds.height, 10);
30321
+ let width = minWidth;
30320
30322
  let height = width * this.option.height / this.option.width;
30321
- if (height > rootBounds.height) {
30322
- height = rootBounds.height;
30323
+ if (height > minHeight) {
30324
+ height = minHeight;
30323
30325
  width = height * this.option.width / this.option.height;
30324
30326
  }
30325
30327
  this.camera.updateInherentScale(width / this.option.width);