@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.cjs CHANGED
@@ -6294,8 +6294,7 @@ var ThreeDPlugin = class {
6294
6294
  scrollWrapper.style.width = "max-content";
6295
6295
  scrollWrapper.style.height = "max-content";
6296
6296
  scrollWrapper.style.display = "flex";
6297
- scrollWrapper.style.flexDirection = "column";
6298
- scrollWrapper.style.alignItems = "center";
6297
+ scrollWrapper.style.alignItems = "flex-start";
6299
6298
  scrollWrapper.style.justifyContent = "flex-start";
6300
6299
  scrollWrapper.style.boxSizing = "border-box";
6301
6300
  const sizer = document.createElement("div");
@@ -6305,7 +6304,7 @@ var ThreeDPlugin = class {
6305
6304
  sizer.style.display = "flex";
6306
6305
  sizer.style.justifyContent = "center";
6307
6306
  sizer.style.alignItems = "center";
6308
- sizer.style.margin = "auto 0";
6307
+ sizer.style.margin = "auto";
6309
6308
  const scene = new THREE__namespace.Scene();
6310
6309
  scene.background = new THREE__namespace.Color(1973796);
6311
6310
  const camera = new THREE__namespace.PerspectiveCamera(45, baseW / baseH, 0.1, 2e3);
@@ -6393,7 +6392,9 @@ var ThreeDPlugin = class {
6393
6392
  const boxH = Math.round(baseH * currentZoom);
6394
6393
  sizer.style.width = `${boxW}px`;
6395
6394
  sizer.style.height = `${boxH}px`;
6396
- sizer.style.margin = boxH < container.clientHeight ? "auto 0" : "0";
6395
+ const marginV = boxH < container.clientHeight ? "auto" : "0";
6396
+ const marginH = boxW < container.clientWidth ? "auto" : "0";
6397
+ sizer.style.margin = `${marginV} ${marginH}`;
6397
6398
  renderer.domElement.style.width = `${boxW}px`;
6398
6399
  renderer.domElement.style.height = `${boxH}px`;
6399
6400
  renderer.domElement.style.maxWidth = "none";
@@ -6446,6 +6447,12 @@ var ThreeDPlugin = class {
6446
6447
  }
6447
6448
  applyZoom();
6448
6449
  },
6450
+ getZoom: () => currentZoom,
6451
+ setZoom: (level) => {
6452
+ isUserZoomed = level !== 1;
6453
+ currentZoom = Math.max(0.2, Math.min(5, level));
6454
+ applyZoom();
6455
+ },
6449
6456
  fitToPage: () => {
6450
6457
  isUserZoomed = false;
6451
6458
  currentZoom = 1;