@flowgram.ai/free-layout-core 0.4.8 → 0.4.9
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 +17 -2
- 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 +17 -2
- 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-Dn8glLaW.d.mts → workflow-line-entity-Nrrmn8EA.d.mts} +3 -1
- package/dist/{workflow-line-entity-BmPrinpL.d.ts → workflow-line-entity-vCUqBg2J.d.ts} +3 -1
- package/package.json +9 -9
package/dist/esm/index.js
CHANGED
|
@@ -455,6 +455,7 @@ var WorkflowNodePortsData = class extends EntityData {
|
|
|
455
455
|
...Array.from(elements).map((element) => ({
|
|
456
456
|
portID: element.getAttribute("data-port-id"),
|
|
457
457
|
type: element.getAttribute("data-port-type"),
|
|
458
|
+
location: element.getAttribute("data-port-location"),
|
|
458
459
|
targetElement: element
|
|
459
460
|
}))
|
|
460
461
|
);
|
|
@@ -1078,7 +1079,9 @@ var _WorkflowLineEntity = class _WorkflowLineEntity extends Entity2 {
|
|
|
1078
1079
|
get disabled() {
|
|
1079
1080
|
return this.linesManager.isDisabledLine(this, this.uiState.disabled);
|
|
1080
1081
|
}
|
|
1081
|
-
/**
|
|
1082
|
+
/**
|
|
1083
|
+
* @deprecated
|
|
1084
|
+
*/
|
|
1082
1085
|
get vertical() {
|
|
1083
1086
|
const fromLocation = this.fromPort.location;
|
|
1084
1087
|
const toLocation = this.toPort?.location;
|
|
@@ -2588,6 +2591,18 @@ function checkDragSuccess(time, e, originLine) {
|
|
|
2588
2591
|
}
|
|
2589
2592
|
return false;
|
|
2590
2593
|
}
|
|
2594
|
+
function reverseLocation(sourceLocation) {
|
|
2595
|
+
switch (sourceLocation) {
|
|
2596
|
+
case "bottom":
|
|
2597
|
+
return "top";
|
|
2598
|
+
case "left":
|
|
2599
|
+
return "right";
|
|
2600
|
+
case "top":
|
|
2601
|
+
return "bottom";
|
|
2602
|
+
case "right":
|
|
2603
|
+
return "left";
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2591
2606
|
var WorkflowDragService = class {
|
|
2592
2607
|
constructor() {
|
|
2593
2608
|
this._onDragLineEventEmitter = new Emitter6();
|
|
@@ -3045,7 +3060,7 @@ var WorkflowDragService = class {
|
|
|
3045
3060
|
line.drawingTo = {
|
|
3046
3061
|
x: dragPos.x,
|
|
3047
3062
|
y: dragPos.y,
|
|
3048
|
-
location: line.fromPort.location
|
|
3063
|
+
location: reverseLocation(line.fromPort.location)
|
|
3049
3064
|
};
|
|
3050
3065
|
}
|
|
3051
3066
|
originLine?.validate();
|