@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.cjs CHANGED
@@ -6246,8 +6246,7 @@ var ThreeDPlugin = class {
6246
6246
  scrollWrapper.style.width = "max-content";
6247
6247
  scrollWrapper.style.height = "max-content";
6248
6248
  scrollWrapper.style.display = "flex";
6249
- scrollWrapper.style.flexDirection = "column";
6250
- scrollWrapper.style.alignItems = "center";
6249
+ scrollWrapper.style.alignItems = "flex-start";
6251
6250
  scrollWrapper.style.justifyContent = "flex-start";
6252
6251
  scrollWrapper.style.boxSizing = "border-box";
6253
6252
  const sizer = document.createElement("div");
@@ -6257,7 +6256,7 @@ var ThreeDPlugin = class {
6257
6256
  sizer.style.display = "flex";
6258
6257
  sizer.style.justifyContent = "center";
6259
6258
  sizer.style.alignItems = "center";
6260
- sizer.style.margin = "auto 0";
6259
+ sizer.style.margin = "auto";
6261
6260
  const scene = new THREE__namespace.Scene();
6262
6261
  scene.background = new THREE__namespace.Color(1973796);
6263
6262
  const camera = new THREE__namespace.PerspectiveCamera(45, baseW / baseH, 0.1, 2e3);
@@ -6345,7 +6344,9 @@ var ThreeDPlugin = class {
6345
6344
  const boxH = Math.round(baseH * currentZoom);
6346
6345
  sizer.style.width = `${boxW}px`;
6347
6346
  sizer.style.height = `${boxH}px`;
6348
- sizer.style.margin = boxH < container.clientHeight ? "auto 0" : "0";
6347
+ const marginV = boxH < container.clientHeight ? "auto" : "0";
6348
+ const marginH = boxW < container.clientWidth ? "auto" : "0";
6349
+ sizer.style.margin = `${marginV} ${marginH}`;
6349
6350
  renderer.domElement.style.width = `${boxW}px`;
6350
6351
  renderer.domElement.style.height = `${boxH}px`;
6351
6352
  renderer.domElement.style.maxWidth = "none";
@@ -6398,6 +6399,12 @@ var ThreeDPlugin = class {
6398
6399
  }
6399
6400
  applyZoom();
6400
6401
  },
6402
+ getZoom: () => currentZoom,
6403
+ setZoom: (level) => {
6404
+ isUserZoomed = level !== 1;
6405
+ currentZoom = Math.max(0.2, Math.min(5, level));
6406
+ applyZoom();
6407
+ },
6401
6408
  fitToPage: () => {
6402
6409
  isUserZoomed = false;
6403
6410
  currentZoom = 1;