@meta2d/core 1.0.40 → 1.0.41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meta2d/core",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1036,7 +1036,7 @@ var Canvas = /** @class */ (function () {
1036
1036
  ((_b = _this.drawingLine) === null || _b === void 0 ? void 0 : _b.calculative.worldAnchors.length) >
1037
1037
  _this.store.options.drawingLineLength)) {
1038
1038
  _this.finishDrawline(true);
1039
- if ((_c = _this.store.active[0]) === null || _c === void 0 ? void 0 : _c.anchors[0].connectTo) {
1039
+ if (((_c = _this.store.active[0]) === null || _c === void 0 ? void 0 : _c.anchors[0].connectTo) || _this.store.active.length == 0) {
1040
1040
  _this.drawingLineName = '';
1041
1041
  }
1042
1042
  else {
@@ -4410,7 +4410,9 @@ var Canvas = /** @class */ (function () {
4410
4410
  if (!from.connectTo || !to.connectTo) {
4411
4411
  if (this.store.options.disableEmptyLine) {
4412
4412
  // 有一端未连线,且 禁止创建空线条
4413
- this.store.pens[from.connectTo].connectedLines = this.store.pens[from.connectTo].connectedLines.filter(function (item) { return item.lineId !== _this.drawingLine.id; });
4413
+ if (from.connectTo) {
4414
+ this.store.pens[from.connectTo].connectedLines = this.store.pens[from.connectTo].connectedLines.filter(function (item) { return item.lineId !== _this.drawingLine.id; });
4415
+ }
4414
4416
  this.drawingLine = undefined;
4415
4417
  this.render();
4416
4418
  return [2 /*return*/];