fabric-vectr 6.7.11 → 6.7.12

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.11";
369
+ var version = "6.7.12";
370
370
 
371
371
  // use this syntax so babel plugin see this import here
372
372
  const VERSION = version;
@@ -12240,9 +12240,17 @@
12240
12240
  _toSVG(reviver) {
12241
12241
  const svgString = ['<g ', 'COMMON_PARTS', ' >\n'];
12242
12242
  const bg = this._createSVGBgRect(reviver);
12243
+ const groupTransformMatrix = this.calcTransformMatrix();
12243
12244
  bg && svgString.push('\t\t', bg);
12244
12245
  for (let i = 0; i < this._objects.length; i++) {
12245
- svgString.push('\t\t', this._objects[i].toSVG(reviver));
12246
+ const object = this._objects[i];
12247
+ if (object.group && object.group !== this) {
12248
+ // 组内对象被 ActiveSelection 临时接管时,需要补回当前组坐标系的变换。
12249
+ const planeChangeMatrix = calcPlaneChangeMatrix(object.group.calcTransformMatrix(), groupTransformMatrix);
12250
+ svgString.push('\t\t<g transform="', matrixToSVG(planeChangeMatrix), '">\n\t\t', object.toSVG(reviver), '\t\t</g>\n');
12251
+ continue;
12252
+ }
12253
+ svgString.push('\t\t', object.toSVG(reviver));
12246
12254
  }
12247
12255
  svgString.push('</g>\n');
12248
12256
  return svgString;