@flowgram.ai/free-layout-core 1.0.11 → 1.0.13

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
@@ -870,6 +870,12 @@ var _WorkflowLineEntity = class _WorkflowLineEntity extends Entity2 {
870
870
  toPort: opts.toPort,
871
871
  data: opts.data
872
872
  });
873
+ if (opts.uiState) {
874
+ this._uiState = {
875
+ ...this._uiState,
876
+ ...opts.uiState
877
+ };
878
+ }
873
879
  if (opts.drawingTo || opts.drawingFrom) {
874
880
  this.isDrawing = true;
875
881
  }
@@ -1548,6 +1554,7 @@ var WorkflowLinesManager = class {
1548
1554
  this._lineType = 0 /* BEZIER */;
1549
1555
  this.onAvailableLinesChangeEmitter = new Emitter4();
1550
1556
  this.onForceUpdateEmitter = new Emitter4();
1557
+ this.defaultUIState = void 0;
1551
1558
  /**
1552
1559
  * 有效的线条被添加或者删除时候触发,未连上的线条不算
1553
1560
  */
@@ -1565,6 +1572,9 @@ var WorkflowLinesManager = class {
1565
1572
  init(doc) {
1566
1573
  this.document = doc;
1567
1574
  }
1575
+ setDefaultUIState(defaultUIState) {
1576
+ this.defaultUIState = defaultUIState;
1577
+ }
1568
1578
  forceUpdate() {
1569
1579
  this.onForceUpdateEmitter.fire();
1570
1580
  }
@@ -1709,7 +1719,8 @@ var WorkflowLinesManager = class {
1709
1719
  to,
1710
1720
  drawingTo,
1711
1721
  drawingFrom,
1712
- data
1722
+ data,
1723
+ uiState: this.defaultUIState
1713
1724
  });
1714
1725
  this.registerData(line);
1715
1726
  fromNode?.addLine(line);