@files-preview-app/preview-file 1.3.19 → 1.3.20

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/vue.js CHANGED
@@ -6213,8 +6213,7 @@ var ThreeDPlugin = class {
6213
6213
  scrollWrapper.style.width = "max-content";
6214
6214
  scrollWrapper.style.height = "max-content";
6215
6215
  scrollWrapper.style.display = "flex";
6216
- scrollWrapper.style.flexDirection = "column";
6217
- scrollWrapper.style.alignItems = "center";
6216
+ scrollWrapper.style.alignItems = "flex-start";
6218
6217
  scrollWrapper.style.justifyContent = "flex-start";
6219
6218
  scrollWrapper.style.boxSizing = "border-box";
6220
6219
  const sizer = document.createElement("div");
@@ -6224,7 +6223,7 @@ var ThreeDPlugin = class {
6224
6223
  sizer.style.display = "flex";
6225
6224
  sizer.style.justifyContent = "center";
6226
6225
  sizer.style.alignItems = "center";
6227
- sizer.style.margin = "auto 0";
6226
+ sizer.style.margin = "auto";
6228
6227
  const scene = new THREE.Scene();
6229
6228
  scene.background = new THREE.Color(1973796);
6230
6229
  const camera = new THREE.PerspectiveCamera(45, baseW / baseH, 0.1, 2e3);
@@ -6312,7 +6311,9 @@ var ThreeDPlugin = class {
6312
6311
  const boxH = Math.round(baseH * currentZoom);
6313
6312
  sizer.style.width = `${boxW}px`;
6314
6313
  sizer.style.height = `${boxH}px`;
6315
- sizer.style.margin = boxH < container.clientHeight ? "auto 0" : "0";
6314
+ const marginV = boxH < container.clientHeight ? "auto" : "0";
6315
+ const marginH = boxW < container.clientWidth ? "auto" : "0";
6316
+ sizer.style.margin = `${marginV} ${marginH}`;
6316
6317
  renderer.domElement.style.width = `${boxW}px`;
6317
6318
  renderer.domElement.style.height = `${boxH}px`;
6318
6319
  renderer.domElement.style.maxWidth = "none";
@@ -6365,6 +6366,12 @@ var ThreeDPlugin = class {
6365
6366
  }
6366
6367
  applyZoom();
6367
6368
  },
6369
+ getZoom: () => currentZoom,
6370
+ setZoom: (level) => {
6371
+ isUserZoomed = level !== 1;
6372
+ currentZoom = Math.max(0.2, Math.min(5, level));
6373
+ applyZoom();
6374
+ },
6368
6375
  fitToPage: () => {
6369
6376
  isUserZoomed = false;
6370
6377
  currentZoom = 1;