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