@netless/app-slide 0.2.101 → 0.2.102

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/main.es.js CHANGED
@@ -38626,10 +38626,13 @@ class SlideControllerBase {
38626
38626
  let isNeedSyncState = false;
38627
38627
  log("[Slide] unfreeze", this.context.appId);
38628
38628
  if (this.invisibleBehavior === "frozen") {
38629
- this.slide.release();
38629
+ this.slide.release(() => {
38630
+ this.slide.notifyFrameResize();
38631
+ });
38630
38632
  isNeedSyncState = true;
38631
38633
  } else {
38632
38634
  this.slide.resume();
38635
+ this.slide.notifyFrameResize();
38633
38636
  }
38634
38637
  if (isNeedSyncState) {
38635
38638
  const state = this.context.storage.state.state;
@@ -40153,6 +40156,7 @@ class ScrollBar {
40153
40156
  class ResizableContainer {
40154
40157
  constructor(parent, context, enableResize, _box) {
40155
40158
  this.onScaleChanged = null;
40159
+ this.onLayoutUpdated = null;
40156
40160
  this.whiteboardContainer = null;
40157
40161
  this.slide = null;
40158
40162
  this.scale = 1;
@@ -40213,6 +40217,7 @@ class ResizableContainer {
40213
40217
  this.slide.on("renderEnd", this.updateSlideSize);
40214
40218
  }
40215
40219
  updateResizableContainer() {
40220
+ var _a, _b;
40216
40221
  const parentBounds = this.scrollContainer.getBoundingClientRect();
40217
40222
  this.container.style.width = `${parentBounds.width * this.scale}px`;
40218
40223
  this.container.style.height = `${parentBounds.height * this.scale}px`;
@@ -40240,6 +40245,8 @@ class ResizableContainer {
40240
40245
  triggerScrollBar: true,
40241
40246
  triggerSync: true
40242
40247
  });
40248
+ (_a = this.slide) == null ? void 0 : _a.notifyFrameResize();
40249
+ (_b = this.onLayoutUpdated) == null ? void 0 : _b.call(this);
40243
40250
  }
40244
40251
  handleNormalizeTranslate(x, y, options) {
40245
40252
  var _a;
@@ -40292,6 +40299,7 @@ class ResizableContainer {
40292
40299
  }
40293
40300
  destroy(_box) {
40294
40301
  var _a;
40302
+ this.onLayoutUpdated = null;
40295
40303
  (_a = this.scrollBar) == null ? void 0 : _a.destroy();
40296
40304
  }
40297
40305
  }
@@ -41134,6 +41142,9 @@ class SlideDocsViewer {
41134
41142
  this.enableScale,
41135
41143
  this.box
41136
41144
  );
41145
+ this.resizableContainer.onLayoutUpdated = () => {
41146
+ this.scaleDocsToFit();
41147
+ };
41137
41148
  }
41138
41149
  this.renderSlideContainer();
41139
41150
  this.renderWhiteboardView();
@@ -41553,7 +41564,7 @@ class SlidePreviewer {
41553
41564
  }
41554
41565
  }
41555
41566
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
41556
- const version = "0.2.101";
41567
+ const version = "0.2.102";
41557
41568
  const SlideApp = {
41558
41569
  kind: "Slide",
41559
41570
  setup(context) {