@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.
- package/dist/WhiteboardApplication.d.ts.map +1 -1
- package/dist/utils/paper.d.ts +2 -0
- package/dist/utils/paper.d.ts.map +1 -0
- package/dist/whiteboard.esm.js +5 -3
- package/dist/whiteboard.esm.js.map +2 -2
- package/dist/whiteboard.js +6 -4
- package/dist/whiteboard.js.map +2 -2
- package/package.json +4 -3
package/dist/whiteboard.js
CHANGED
|
@@ -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
|
-
|
|
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 >
|
|
30322
|
-
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);
|