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.
@@ -418,7 +418,7 @@ class Cache {
418
418
  }
419
419
  const cache = new Cache();
420
420
 
421
- var version = "6.7.15";
421
+ var version = "6.7.16";
422
422
 
423
423
  // use this syntax so babel plugin see this import here
424
424
  const VERSION = version;
@@ -24591,7 +24591,10 @@ class Textbox extends IText {
24591
24591
  }
24592
24592
 
24593
24593
  // 处理文字的水平偏移
24594
- spanOffX = options.left - (minSpanX || 0);
24594
+ // 只有当 tspan 显式携带 x/dx 位置(minSpanX 非空)时,tspan 的 x 才是相对
24595
+ // <text> 原点的偏移量,需要换算成绝对坐标;否则 <text> 上的 x 本身就是绝对坐标,
24596
+ // 直接使用,避免把整个 left 减掉导致 X 轴整体偏移(GPT 等标准 SVG 常见)。
24597
+ spanOffX = minSpanX != null ? options.left - minSpanX : 0;
24595
24598
 
24596
24599
  // textAlign保持和parsedAnchor一致
24597
24600
  options.textAlign = parsedAnchor;