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