@meta2d/core 1.1.5 → 1.1.6

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/src/core.js CHANGED
@@ -576,7 +576,7 @@ export class Meta2d {
576
576
  }
577
577
  getSendData(data, cpen) {
578
578
  const value = {};
579
- data.forEach((item) => {
579
+ data?.forEach((item) => {
580
580
  if (item.prop) {
581
581
  if (item.id && item.id !== '固定值') {
582
582
  const pen = this.findOne(item.id);
@@ -4279,12 +4279,12 @@ export class Meta2d {
4279
4279
  }
4280
4280
  let mySerializedSVG = ctx.getSerializedSvg();
4281
4281
  if (defs?.length) {
4282
- mySerializedSVG = mySerializedSVG.replace('<defs/>', `<defs>
4283
- <style type="text/css">
4284
- ${defs.join('\n')}
4285
- </style>
4286
- {{bk}}
4287
- </defs>
4282
+ mySerializedSVG = mySerializedSVG.replace('<defs/>', `<defs>
4283
+ <style type="text/css">
4284
+ ${defs.join('\n')}
4285
+ </style>
4286
+ {{bk}}
4287
+ </defs>
4288
4288
  {{bkRect}}`);
4289
4289
  }
4290
4290
  if (background) {
@@ -4353,7 +4353,7 @@ export class Meta2d {
4353
4353
  else {
4354
4354
  ratio = w > h ? w : h;
4355
4355
  }
4356
- if (this.store.data.fits?.length) {
4356
+ if (fill && this.store.data.fits?.length) {
4357
4357
  this.canvas.opening = true;
4358
4358
  }
4359
4359
  // 该方法直接更改画布的 scale 属性,所以比率应该乘以当前 scale
@@ -4705,7 +4705,7 @@ export class Meta2d {
4705
4705
  ratio = w > h ? w : h;
4706
4706
  }
4707
4707
  }
4708
- if (this.store.data.fits?.length) {
4708
+ if (fill && this.store.data.fits?.length) {
4709
4709
  this.canvas.opening = true;
4710
4710
  }
4711
4711
  // 该方法直接更改画布的 scale 属性,所以比率应该乘以当前 scale
@@ -6086,6 +6086,7 @@ export class Meta2d {
6086
6086
  globalStore.canvasDraws = {};
6087
6087
  globalStore.anchors = {};
6088
6088
  globalStore.htmlElements = {};
6089
+ globalStore.lineAnimateDraws = {};
6089
6090
  }
6090
6091
  }
6091
6092
  }