@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/angular.js CHANGED
@@ -6261,8 +6261,7 @@ var ThreeDPlugin = class {
6261
6261
  scrollWrapper.style.width = "max-content";
6262
6262
  scrollWrapper.style.height = "max-content";
6263
6263
  scrollWrapper.style.display = "flex";
6264
- scrollWrapper.style.flexDirection = "column";
6265
- scrollWrapper.style.alignItems = "center";
6264
+ scrollWrapper.style.alignItems = "flex-start";
6266
6265
  scrollWrapper.style.justifyContent = "flex-start";
6267
6266
  scrollWrapper.style.boxSizing = "border-box";
6268
6267
  const sizer = document.createElement("div");
@@ -6272,7 +6271,7 @@ var ThreeDPlugin = class {
6272
6271
  sizer.style.display = "flex";
6273
6272
  sizer.style.justifyContent = "center";
6274
6273
  sizer.style.alignItems = "center";
6275
- sizer.style.margin = "auto 0";
6274
+ sizer.style.margin = "auto";
6276
6275
  const scene = new THREE.Scene();
6277
6276
  scene.background = new THREE.Color(1973796);
6278
6277
  const camera = new THREE.PerspectiveCamera(45, baseW / baseH, 0.1, 2e3);
@@ -6360,7 +6359,9 @@ var ThreeDPlugin = class {
6360
6359
  const boxH = Math.round(baseH * currentZoom);
6361
6360
  sizer.style.width = `${boxW}px`;
6362
6361
  sizer.style.height = `${boxH}px`;
6363
- sizer.style.margin = boxH < container.clientHeight ? "auto 0" : "0";
6362
+ const marginV = boxH < container.clientHeight ? "auto" : "0";
6363
+ const marginH = boxW < container.clientWidth ? "auto" : "0";
6364
+ sizer.style.margin = `${marginV} ${marginH}`;
6364
6365
  renderer.domElement.style.width = `${boxW}px`;
6365
6366
  renderer.domElement.style.height = `${boxH}px`;
6366
6367
  renderer.domElement.style.maxWidth = "none";
@@ -6413,6 +6414,12 @@ var ThreeDPlugin = class {
6413
6414
  }
6414
6415
  applyZoom();
6415
6416
  },
6417
+ getZoom: () => currentZoom,
6418
+ setZoom: (level) => {
6419
+ isUserZoomed = level !== 1;
6420
+ currentZoom = Math.max(0.2, Math.min(5, level));
6421
+ applyZoom();
6422
+ },
6416
6423
  fitToPage: () => {
6417
6424
  isUserZoomed = false;
6418
6425
  currentZoom = 1;