@flowgram.ai/free-layout-core 1.0.3 → 1.0.7

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
@@ -2740,7 +2740,10 @@ var WorkflowDragService = class {
2740
2740
  */
2741
2741
  async startDragSelectedNodes(triggerEvent) {
2742
2742
  let { selectedNodes } = this.selectService;
2743
- if (selectedNodes.length === 0 || this.playgroundConfig.readonly || this.playgroundConfig.disabled || this.isDragging) {
2743
+ if (selectedNodes.length === 0 || this.isDragging) {
2744
+ return Promise.resolve(false);
2745
+ }
2746
+ if (!this.document.options.enableReadonlyNodeDragging && (this.playgroundConfig.readonly || this.playgroundConfig.disabled)) {
2744
2747
  return Promise.resolve(false);
2745
2748
  }
2746
2749
  this.isDragging = true;
@@ -3197,7 +3200,6 @@ var WorkflowDragService = class {
3197
3200
  const dragPos = config.getPosFromMouseEvent(e);
3198
3201
  newLineInfo = this.updateDrawingLine(isDrawingTo, line, dragPos, originLine);
3199
3202
  },
3200
- // eslint-disable-next-line complexity
3201
3203
  onDragEnd: async (e) => {
3202
3204
  const dragPos = config.getPosFromMouseEvent(e);
3203
3205
  const onDragLineEndCallbacks = Array.from(this._onDragLineEndCallbacks.values());