@flowgram.ai/free-layout-core 0.2.24 → 0.2.25
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 +15 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/typings/index.d.mts +1 -1
- package/dist/typings/index.d.ts +1 -1
- package/dist/typings/workflow-drag.d.mts +1 -1
- package/dist/typings/workflow-drag.d.ts +1 -1
- package/dist/typings/workflow-json.d.mts +1 -1
- package/dist/typings/workflow-json.d.ts +1 -1
- package/dist/typings/workflow-line.d.mts +1 -1
- package/dist/typings/workflow-line.d.ts +1 -1
- package/dist/typings/workflow-node.d.mts +1 -1
- package/dist/typings/workflow-node.d.ts +1 -1
- package/dist/typings/workflow-registry.d.mts +1 -1
- package/dist/typings/workflow-registry.d.ts +1 -1
- package/dist/{workflow-line-entity-BWrInTFK.d.mts → workflow-line-entity-BmfC83KK.d.mts} +3 -0
- package/dist/{workflow-line-entity-BvKc5ehl.d.ts → workflow-line-entity-pkRs4Hgt.d.ts} +3 -0
- package/package.json +9 -9
package/dist/esm/index.js
CHANGED
|
@@ -699,7 +699,8 @@ var _WorkflowLineEntity = class _WorkflowLineEntity extends Entity2 {
|
|
|
699
699
|
vertical: false,
|
|
700
700
|
hideArrow: false,
|
|
701
701
|
reverse: false,
|
|
702
|
-
highlightColor: ""
|
|
702
|
+
highlightColor: "",
|
|
703
|
+
lockedColor: ""
|
|
703
704
|
};
|
|
704
705
|
this.stackIndex = 0;
|
|
705
706
|
/**
|
|
@@ -870,6 +871,14 @@ var _WorkflowLineEntity = class _WorkflowLineEntity extends Entity2 {
|
|
|
870
871
|
highlightColor
|
|
871
872
|
});
|
|
872
873
|
}
|
|
874
|
+
get lockedColor() {
|
|
875
|
+
return this.uiState.lockedColor;
|
|
876
|
+
}
|
|
877
|
+
set lockedColor(lockedColor) {
|
|
878
|
+
this.updateUIState({
|
|
879
|
+
lockedColor
|
|
880
|
+
});
|
|
881
|
+
}
|
|
873
882
|
/**
|
|
874
883
|
* 获取线条的边框位置大小
|
|
875
884
|
*/
|
|
@@ -1482,6 +1491,9 @@ var WorkflowLinesManager = class {
|
|
|
1482
1491
|
if (line.isHidden) {
|
|
1483
1492
|
return this.lineColor.hidden;
|
|
1484
1493
|
}
|
|
1494
|
+
if (line.lockedColor) {
|
|
1495
|
+
return line.lockedColor;
|
|
1496
|
+
}
|
|
1485
1497
|
if (line.hasError) {
|
|
1486
1498
|
return this.lineColor.error;
|
|
1487
1499
|
}
|
|
@@ -2779,7 +2791,7 @@ var WorkflowDragService = class {
|
|
|
2779
2791
|
return;
|
|
2780
2792
|
}
|
|
2781
2793
|
config.updateCursor("grab");
|
|
2782
|
-
line.highlightColor = this.linesManager.lineColor.drawing;
|
|
2794
|
+
line.highlightColor = originLine?.lockedColor || this.linesManager.lineColor.drawing;
|
|
2783
2795
|
this.hoverService.updateHoveredKey("");
|
|
2784
2796
|
}
|
|
2785
2797
|
if (!line) {
|
|
@@ -2801,7 +2813,7 @@ var WorkflowDragService = class {
|
|
|
2801
2813
|
this._onDragLineEventEmitter.fire({
|
|
2802
2814
|
type: "onDrag"
|
|
2803
2815
|
});
|
|
2804
|
-
this.setLineColor(line, this.linesManager.lineColor.drawing);
|
|
2816
|
+
this.setLineColor(line, originLine?.lockedColor || this.linesManager.lineColor.drawing);
|
|
2805
2817
|
if (toNode && this.canBuildContainerLine(toNode, dragPos)) {
|
|
2806
2818
|
toPort = this.getNearestPort(toNode, dragPos);
|
|
2807
2819
|
const { hasError } = this.handleDragOnNode(toNode, fromPort, line, toPort, originLine);
|