fabric-vectr 6.7.15 → 6.7.16

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/index.mjs CHANGED
@@ -360,7 +360,7 @@ class Cache {
360
360
  }
361
361
  const cache = new Cache();
362
362
 
363
- var version = "6.7.15";
363
+ var version = "6.7.16";
364
364
 
365
365
  // use this syntax so babel plugin see this import here
366
366
  const VERSION = version;
@@ -24533,7 +24533,10 @@ class Textbox extends IText {
24533
24533
  }
24534
24534
 
24535
24535
  // 处理文字的水平偏移
24536
- spanOffX = options.left - (minSpanX || 0);
24536
+ // 只有当 tspan 显式携带 x/dx 位置(minSpanX 非空)时,tspan 的 x 才是相对
24537
+ // <text> 原点的偏移量,需要换算成绝对坐标;否则 <text> 上的 x 本身就是绝对坐标,
24538
+ // 直接使用,避免把整个 left 减掉导致 X 轴整体偏移(GPT 等标准 SVG 常见)。
24539
+ spanOffX = minSpanX != null ? options.left - minSpanX : 0;
24537
24540
 
24538
24541
  // textAlign保持和parsedAnchor一致
24539
24542
  options.textAlign = parsedAnchor;