@flowgram.ai/free-layout-core 1.0.6 → 1.0.8

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
@@ -817,7 +817,10 @@ var WorkflowLineRenderData = class extends EntityData3 {
817
817
  this.data.position.from.location,
818
818
  this.data.position.to.x,
819
819
  this.data.position.to.y,
820
- this.data.position.to.location
820
+ this.data.position.to.location,
821
+ this.entity.uiState.shrink,
822
+ // 这个会影响线条的变化
823
+ this.entity.uiState.curvature
821
824
  ].join("-");
822
825
  }
823
826
  get currentLine() {
@@ -2740,7 +2743,10 @@ var WorkflowDragService = class {
2740
2743
  */
2741
2744
  async startDragSelectedNodes(triggerEvent) {
2742
2745
  let { selectedNodes } = this.selectService;
2743
- if (selectedNodes.length === 0 || this.playgroundConfig.readonly || this.playgroundConfig.disabled || this.isDragging) {
2746
+ if (selectedNodes.length === 0 || this.isDragging) {
2747
+ return Promise.resolve(false);
2748
+ }
2749
+ if (!this.document.options.enableReadonlyNodeDragging && (this.playgroundConfig.readonly || this.playgroundConfig.disabled)) {
2744
2750
  return Promise.resolve(false);
2745
2751
  }
2746
2752
  this.isDragging = true;
@@ -3197,7 +3203,6 @@ var WorkflowDragService = class {
3197
3203
  const dragPos = config.getPosFromMouseEvent(e);
3198
3204
  newLineInfo = this.updateDrawingLine(isDrawingTo, line, dragPos, originLine);
3199
3205
  },
3200
- // eslint-disable-next-line complexity
3201
3206
  onDragEnd: async (e) => {
3202
3207
  const dragPos = config.getPosFromMouseEvent(e);
3203
3208
  const onDragLineEndCallbacks = Array.from(this._onDragLineEndCallbacks.values());