@meta2d/core 1.1.5 → 1.1.7

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);
@@ -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
@@ -5287,6 +5287,7 @@ export class Meta2d {
5287
5287
  this.store.data.y = y;
5288
5288
  for (const pen of this.store.data.pens) {
5289
5289
  calcInView(pen);
5290
+ pen.onMove?.(pen);
5290
5291
  }
5291
5292
  this.canvas.canvasImage.init();
5292
5293
  this.canvas.canvasImageBottom.init();
@@ -6086,6 +6087,7 @@ export class Meta2d {
6086
6087
  globalStore.canvasDraws = {};
6087
6088
  globalStore.anchors = {};
6088
6089
  globalStore.htmlElements = {};
6090
+ globalStore.lineAnimateDraws = {};
6089
6091
  }
6090
6092
  }
6091
6093
  }