@flowgram.ai/document 0.5.2 → 0.5.4

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
@@ -240,7 +240,6 @@ var OperationType = /* @__PURE__ */ ((OperationType2) => {
240
240
  OperationType2["moveChildNodes"] = "moveChildNodes";
241
241
  OperationType2["addNodes"] = "addNodes";
242
242
  OperationType2["deleteNodes"] = "deleteNodes";
243
- OperationType2["changeNode"] = "changeNode";
244
243
  OperationType2["addChildNode"] = "addChildNode";
245
244
  OperationType2["deleteChildNode"] = "deleteChildNode";
246
245
  OperationType2["addNode"] = "addNode";
@@ -1203,6 +1202,14 @@ var FlowRendererStateEntity = class extends ConfigEntity2 {
1203
1202
  dragging
1204
1203
  });
1205
1204
  }
1205
+ get isBranch() {
1206
+ return this.config.isBranch;
1207
+ }
1208
+ setIsBranch(isBranch) {
1209
+ this.updateConfig({
1210
+ isBranch
1211
+ });
1212
+ }
1206
1213
  getDragLabelSide() {
1207
1214
  return this.config.dragLabelSide;
1208
1215
  }
@@ -2459,7 +2466,7 @@ var FlowDragService = class {
2459
2466
  }
2460
2467
  // 是否在拖拽分支
2461
2468
  get isDragBranch() {
2462
- return this.dragStartNode?.isInlineBlock;
2469
+ return this.renderState.isBranch || this.dragStartNode?.isInlineBlock;
2463
2470
  }
2464
2471
  // 拖拽的所有节点及其自节点
2465
2472
  get nodeDragIdsWithChildren() {
@@ -2550,6 +2557,9 @@ var FlowDragService = class {
2550
2557
  * @param side 分支的前面还是后面
2551
2558
  */
2552
2559
  isDroppableBranch(node, side = "normal_branch" /* NORMAL_BRANCH */) {
2560
+ if (this.renderState.isBranch) {
2561
+ return true;
2562
+ }
2553
2563
  if (this.isDragBranch) {
2554
2564
  if (
2555
2565
  // 拖拽到分支