@netless/app-presentation 0.1.9-beta.7 → 0.1.9-beta.8
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.global.js +11 -3
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/scrollbar/index.ts +9 -1
package/dist/index.global.js
CHANGED
|
@@ -6923,7 +6923,7 @@ var NetlessAppPresentation = (function (exports) {
|
|
|
6923
6923
|
(_b = (_a = this.option.scrollbarEventCallback) == null ? void 0 : _a.onScrollbarDragEnd) == null ? void 0 : _b.call(_a);
|
|
6924
6924
|
};
|
|
6925
6925
|
this.moveCamera = (camera) => {
|
|
6926
|
-
const { centerX, centerY } = camera;
|
|
6926
|
+
const { centerX, centerY, scale } = camera;
|
|
6927
6927
|
const cacheCamera = this.view.camera;
|
|
6928
6928
|
const _camera = {};
|
|
6929
6929
|
if ((0, import_lodash.isNumber)(centerX)) {
|
|
@@ -6946,6 +6946,14 @@ var NetlessAppPresentation = (function (exports) {
|
|
|
6946
6946
|
}
|
|
6947
6947
|
_camera.centerY = newCenterY;
|
|
6948
6948
|
}
|
|
6949
|
+
if ((0, import_lodash.isNumber)(scale)) {
|
|
6950
|
+
let newScale = scale;
|
|
6951
|
+
const originScale = this.option.getOriginScale();
|
|
6952
|
+
if (scale < originScale) {
|
|
6953
|
+
newScale = originScale;
|
|
6954
|
+
}
|
|
6955
|
+
_camera.scale = newScale;
|
|
6956
|
+
}
|
|
6949
6957
|
this.view.moveCamera(__spreadProps(__spreadValues({}, _camera), {
|
|
6950
6958
|
animationMode: "immediately"
|
|
6951
6959
|
}));
|
|
@@ -7294,7 +7302,7 @@ var NetlessAppPresentation = (function (exports) {
|
|
|
7294
7302
|
};
|
|
7295
7303
|
const box = context.getBox();
|
|
7296
7304
|
const app = dispose2.add(createPresentation(box, pages, jumpPage, pageIndex$, view, options.thumbnail, options.useClipView));
|
|
7297
|
-
app.contentDOM.dataset.appPresentationVersion = "0.1.9-beta.
|
|
7305
|
+
app.contentDOM.dataset.appPresentationVersion = "0.1.9-beta.8";
|
|
7298
7306
|
app.scaleDocsToFit = scaleDocsToFit;
|
|
7299
7307
|
app.log = log;
|
|
7300
7308
|
if (options.justDocsViewReadonly) {
|
|
@@ -7613,7 +7621,7 @@ var NetlessAppPresentation = (function (exports) {
|
|
|
7613
7621
|
};
|
|
7614
7622
|
|
|
7615
7623
|
// src/index.ts
|
|
7616
|
-
var version = "0.1.9-beta.
|
|
7624
|
+
var version = "0.1.9-beta.8";
|
|
7617
7625
|
/*! Bundled license information:
|
|
7618
7626
|
|
|
7619
7627
|
lodash/lodash.js:
|
package/dist/index.js
CHANGED
|
@@ -6924,7 +6924,7 @@ var Scrollbar = class {
|
|
|
6924
6924
|
(_b = (_a = this.option.scrollbarEventCallback) == null ? void 0 : _a.onScrollbarDragEnd) == null ? void 0 : _b.call(_a);
|
|
6925
6925
|
};
|
|
6926
6926
|
this.moveCamera = (camera) => {
|
|
6927
|
-
const { centerX, centerY } = camera;
|
|
6927
|
+
const { centerX, centerY, scale } = camera;
|
|
6928
6928
|
const cacheCamera = this.view.camera;
|
|
6929
6929
|
const _camera = {};
|
|
6930
6930
|
if ((0, import_lodash.isNumber)(centerX)) {
|
|
@@ -6947,6 +6947,14 @@ var Scrollbar = class {
|
|
|
6947
6947
|
}
|
|
6948
6948
|
_camera.centerY = newCenterY;
|
|
6949
6949
|
}
|
|
6950
|
+
if ((0, import_lodash.isNumber)(scale)) {
|
|
6951
|
+
let newScale = scale;
|
|
6952
|
+
const originScale = this.option.getOriginScale();
|
|
6953
|
+
if (scale < originScale) {
|
|
6954
|
+
newScale = originScale;
|
|
6955
|
+
}
|
|
6956
|
+
_camera.scale = newScale;
|
|
6957
|
+
}
|
|
6950
6958
|
this.view.moveCamera(__spreadProps(__spreadValues({}, _camera), {
|
|
6951
6959
|
animationMode: "immediately"
|
|
6952
6960
|
}));
|
|
@@ -7295,7 +7303,7 @@ var NetlessAppPresentation = {
|
|
|
7295
7303
|
};
|
|
7296
7304
|
const box = context.getBox();
|
|
7297
7305
|
const app = dispose2.add(createPresentation(box, pages, jumpPage, pageIndex$, view, options.thumbnail, options.useClipView));
|
|
7298
|
-
app.contentDOM.dataset.appPresentationVersion = "0.1.9-beta.
|
|
7306
|
+
app.contentDOM.dataset.appPresentationVersion = "0.1.9-beta.8";
|
|
7299
7307
|
app.scaleDocsToFit = scaleDocsToFit;
|
|
7300
7308
|
app.log = log;
|
|
7301
7309
|
if (options.justDocsViewReadonly) {
|
|
@@ -7614,7 +7622,7 @@ var install = (register, options = {}) => {
|
|
|
7614
7622
|
};
|
|
7615
7623
|
|
|
7616
7624
|
// src/index.ts
|
|
7617
|
-
var version = "0.1.9-beta.
|
|
7625
|
+
var version = "0.1.9-beta.8";
|
|
7618
7626
|
/*! Bundled license information:
|
|
7619
7627
|
|
|
7620
7628
|
lodash/lodash.js:
|