@mxmweb/fviewer 1.5.5 → 1.5.7

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/index.js CHANGED
@@ -239,7 +239,7 @@ const De = "#FFEB3B", Be = () => `annotation_${Date.now()}_${Math.random().toStr
239
239
  const A = g.current ? g.current.offsetWidth - 40 : null;
240
240
  if (!A || !(F != null && F.width)) return;
241
241
  const X = F.width, c = +(A / X).toFixed(2);
242
- typeof c == "number" ? f && f(c) : (clearInterval(_.current), _.current = null);
242
+ typeof c == "number" ? f && f(Math.min(c, 1)) : (clearInterval(_.current), _.current = null);
243
243
  };
244
244
  return te(() => {
245
245
  if (!g.current || !(F != null && F.width) || !(F != null && F.height)) {
@@ -274,7 +274,7 @@ const De = "#FFEB3B", Be = () => `annotation_${Date.now()}_${Math.random().toStr
274
274
  className: "relative",
275
275
  style: {
276
276
  transform: `scale(${u})`,
277
- transformOrigin: "center",
277
+ transformOrigin: "top",
278
278
  display: "inline-block"
279
279
  // 确保容器适应内容尺寸
280
280
  }
@@ -679,7 +679,8 @@ const De = "#FFEB3B", Be = () => `annotation_${Date.now()}_${Math.random().toStr
679
679
  background: "transparent",
680
680
  width: "100%",
681
681
  height: "auto",
682
- overflow: "visible"
682
+ overflow: "visible",
683
+ whiteSpace: "pre-line"
683
684
  }
684
685
  }
685
686
  )