@netless/app-presentation 0.1.9-beta.7 → 0.1.9

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.mjs CHANGED
@@ -6920,7 +6920,7 @@ var Scrollbar = class {
6920
6920
  (_b = (_a = this.option.scrollbarEventCallback) == null ? void 0 : _a.onScrollbarDragEnd) == null ? void 0 : _b.call(_a);
6921
6921
  };
6922
6922
  this.moveCamera = (camera) => {
6923
- const { centerX, centerY } = camera;
6923
+ const { centerX, centerY, scale } = camera;
6924
6924
  const cacheCamera = this.view.camera;
6925
6925
  const _camera = {};
6926
6926
  if ((0, import_lodash.isNumber)(centerX)) {
@@ -6943,6 +6943,14 @@ var Scrollbar = class {
6943
6943
  }
6944
6944
  _camera.centerY = newCenterY;
6945
6945
  }
6946
+ if ((0, import_lodash.isNumber)(scale)) {
6947
+ let newScale = scale;
6948
+ const originScale = this.option.getOriginScale();
6949
+ if (scale < originScale) {
6950
+ newScale = originScale;
6951
+ }
6952
+ _camera.scale = newScale;
6953
+ }
6946
6954
  this.view.moveCamera(__spreadProps(__spreadValues({}, _camera), {
6947
6955
  animationMode: "immediately"
6948
6956
  }));
@@ -7291,7 +7299,7 @@ var NetlessAppPresentation = {
7291
7299
  };
7292
7300
  const box = context.getBox();
7293
7301
  const app = dispose2.add(createPresentation(box, pages, jumpPage, pageIndex$, view, options.thumbnail, options.useClipView));
7294
- app.contentDOM.dataset.appPresentationVersion = "0.1.9-beta.7";
7302
+ app.contentDOM.dataset.appPresentationVersion = "0.1.9";
7295
7303
  app.scaleDocsToFit = scaleDocsToFit;
7296
7304
  app.log = log;
7297
7305
  if (options.justDocsViewReadonly) {
@@ -7610,7 +7618,7 @@ var install = (register, options = {}) => {
7610
7618
  };
7611
7619
 
7612
7620
  // src/index.ts
7613
- var version = "0.1.9-beta.7";
7621
+ var version = "0.1.9";
7614
7622
  /*! Bundled license information:
7615
7623
 
7616
7624
  lodash/lodash.js: