@meta2d/core 1.0.86 → 1.0.87

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
@@ -727,16 +727,16 @@ export class Meta2d {
727
727
  .map((key) => key + '=' + value[key])
728
728
  .join('&');
729
729
  }
730
- if (network.method === 'POST') {
731
- if (url.indexOf('${') > -1) {
732
- let keys = url.match(/\$\{([^}]+)\}/g)?.map(m => m.slice(2, -1));
733
- if (keys) {
734
- keys.forEach((key) => {
735
- url = url.replace(`\${${key}}`, getter(pen, key) || this.getDynamicParam(key));
736
- });
737
- }
730
+ // if (network.method === 'POST') {
731
+ if (url.indexOf('${') > -1) {
732
+ let keys = url.match(/\$\{([^}]+)\}/g)?.map(m => m.slice(2, -1));
733
+ if (keys) {
734
+ keys.forEach((key) => {
735
+ url = url.replace(`\${${key}}`, getter(pen, key) || this.getDynamicParam(key));
736
+ });
738
737
  }
739
738
  }
739
+ // }
740
740
  const res = await fetch(url + (params ? params : ''), {
741
741
  headers: network.headers || {},
742
742
  method: network.method,
@@ -988,6 +988,11 @@ export class Meta2d {
988
988
  }
989
989
  }
990
990
  //无效连线 单个锚点连线
991
+ if (pen.name === 'line') {
992
+ if (pen.anchors.length < 2) {
993
+ dirtyPens.push(pen);
994
+ }
995
+ }
991
996
  }
992
997
  if (!width || !height) {
993
998
  //2d 偏移量很大
@@ -5407,6 +5412,8 @@ export class Meta2d {
5407
5412
  pens.splice(index, 1);
5408
5413
  }
5409
5414
  }
5415
+ this.initTemplateCanvas([pen]);
5416
+ this.initImageCanvas([pen]);
5410
5417
  }
5411
5418
  changePenId(oldId, newId) {
5412
5419
  this.canvas.changePenId(oldId, newId);