@flowgram.ai/free-layout-core 0.1.17 → 0.1.21

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/esm/index.js CHANGED
@@ -247,10 +247,17 @@ var WorkflowPortEntity = class extends Entity {
247
247
  }
248
248
  /**
249
249
  * 当前点位上连接的线条
250
+ * @deprecated use `availableLines` instead
250
251
  */
251
252
  get lines() {
252
253
  return this.allLines.filter((line) => !line.isDrawing);
253
254
  }
255
+ /**
256
+ * 当前有效的线条,不包含正在画的线条和隐藏的线条(这个出现在线条重连会先把原来的线条隐藏)
257
+ */
258
+ get availableLines() {
259
+ return this.allLines.filter((line) => !line.isDrawing && !line.isHidden);
260
+ }
254
261
  /**
255
262
  * 当前点位上连接的线条(包含 isDrawing === true 的线条)
256
263
  */
@@ -2457,10 +2464,7 @@ var WorkflowDragService = class {
2457
2464
  dragNodeType: type,
2458
2465
  dropNode
2459
2466
  });
2460
- if (!allowDrop) {
2461
- return this.clearDrop();
2462
- }
2463
- const dragNode = await this.dropCard(type, e, data, dropNode);
2467
+ const dragNode = allowDrop ? await this.dropCard(type, e, data, dropNode) : void 0;
2464
2468
  this.clearDrop();
2465
2469
  if (dragNode) {
2466
2470
  domNode.remove();