-
-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(kamada-kawai): don't reposition fixed nodes (#1005)
- Loading branch information
Showing
5 changed files
with
330 additions
and
1 deletion.
There are no files selected for viewing
90 changes: 90 additions & 0 deletions
90
cypress/integration/visual/initial-positioning.no-fixed-no-positions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"nodes": [ | ||
{ | ||
"id": 0, | ||
"type": "A", | ||
"label": "A Node 1", | ||
"color": "orange" | ||
}, | ||
{ | ||
"id": 1, | ||
"type": "A", | ||
"label": "A node 2", | ||
"color": "orange" | ||
}, | ||
{ | ||
"id": 2, | ||
"type": "A", | ||
"label": "A node 3", | ||
"color": "orange" | ||
}, | ||
{ | ||
"id": 3, | ||
"type": "A", | ||
"label": "A Node 4", | ||
"color": "orange" | ||
}, | ||
{ | ||
"id": 4, | ||
"type": "A", | ||
"label": "A Node 5", | ||
"color": "orange" | ||
}, | ||
|
||
{ | ||
"id": 5, | ||
"type": "B", | ||
"label": "B Node 1" | ||
}, | ||
{ | ||
"id": 6, | ||
"type": "B", | ||
"label": "B Node 2" | ||
}, | ||
{ | ||
"id": 7, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 8, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 9, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 10, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 11, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 12, | ||
"type": "B", | ||
"label": "B Node " | ||
} | ||
], | ||
|
||
"edges": [ | ||
{ "from": 0, "to": 1 }, | ||
{ "from": 1, "to": 2 }, | ||
{ "from": 1, "to": 3 }, | ||
{ "from": 1, "to": 4 }, | ||
{ "from": 2, "to": 5 }, | ||
{ "from": 3, "to": 6 }, | ||
{ "from": 4, "to": 7 }, | ||
{ "from": 4, "to": 8 }, | ||
{ "from": 4, "to": 9 }, | ||
{ "from": 4, "to": 10 }, | ||
{ "from": 4, "to": 11 }, | ||
{ "from": 4, "to": 12 } | ||
] | ||
} |
100 changes: 100 additions & 0 deletions
100
cypress/integration/visual/initial-positioning.no-fixed-some-positions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"nodes": [ | ||
{ | ||
"id": 0, | ||
"type": "A", | ||
"label": "A Node 1", | ||
"color": "orange", | ||
"x": -50, | ||
"y": -50 | ||
}, | ||
{ | ||
"id": 1, | ||
"type": "A", | ||
"label": "A node 2", | ||
"color": "orange", | ||
"x": -50, | ||
"y": 50 | ||
}, | ||
{ | ||
"id": 2, | ||
"type": "A", | ||
"label": "A node 3", | ||
"color": "orange", | ||
"x": -150, | ||
"y": 50 | ||
}, | ||
{ | ||
"id": 3, | ||
"type": "A", | ||
"label": "A Node 4", | ||
"color": "orange", | ||
"x": 50, | ||
"y": 50 | ||
}, | ||
{ | ||
"id": 4, | ||
"type": "A", | ||
"label": "A Node 5", | ||
"color": "orange", | ||
"x": -50, | ||
"y": 150 | ||
}, | ||
|
||
{ | ||
"id": 5, | ||
"type": "B", | ||
"label": "B Node 1" | ||
}, | ||
{ | ||
"id": 6, | ||
"type": "B", | ||
"label": "B Node 2" | ||
}, | ||
{ | ||
"id": 7, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 8, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 9, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 10, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 11, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 12, | ||
"type": "B", | ||
"label": "B Node " | ||
} | ||
], | ||
|
||
"edges": [ | ||
{ "from": 0, "to": 1 }, | ||
{ "from": 1, "to": 2 }, | ||
{ "from": 1, "to": 3 }, | ||
{ "from": 1, "to": 4 }, | ||
{ "from": 2, "to": 5 }, | ||
{ "from": 3, "to": 6 }, | ||
{ "from": 4, "to": 7 }, | ||
{ "from": 4, "to": 8 }, | ||
{ "from": 4, "to": 9 }, | ||
{ "from": 4, "to": 10 }, | ||
{ "from": 4, "to": 11 }, | ||
{ "from": 4, "to": 12 } | ||
] | ||
} |
105 changes: 105 additions & 0 deletions
105
cypress/integration/visual/initial-positioning.some-fixed-some-positions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"nodes": [ | ||
{ | ||
"id": 0, | ||
"type": "A", | ||
"label": "A Node 1", | ||
"color": "orange", | ||
"fixed": true, | ||
"x": -50, | ||
"y": -50 | ||
}, | ||
{ | ||
"id": 1, | ||
"type": "A", | ||
"label": "A node 2", | ||
"color": "orange", | ||
"fixed": true, | ||
"x": -50, | ||
"y": 50 | ||
}, | ||
{ | ||
"id": 2, | ||
"type": "A", | ||
"label": "A node 3", | ||
"color": "orange", | ||
"fixed": true, | ||
"x": -150, | ||
"y": 50 | ||
}, | ||
{ | ||
"id": 3, | ||
"type": "A", | ||
"label": "A Node 4", | ||
"color": "orange", | ||
"fixed": true, | ||
"x": 50, | ||
"y": 50 | ||
}, | ||
{ | ||
"id": 4, | ||
"type": "A", | ||
"label": "A Node 5", | ||
"color": "orange", | ||
"fixed": true, | ||
"x": -50, | ||
"y": 150 | ||
}, | ||
|
||
{ | ||
"id": 5, | ||
"type": "B", | ||
"label": "B Node 1" | ||
}, | ||
{ | ||
"id": 6, | ||
"type": "B", | ||
"label": "B Node 2" | ||
}, | ||
{ | ||
"id": 7, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 8, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 9, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 10, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 11, | ||
"type": "B", | ||
"label": "B Node " | ||
}, | ||
{ | ||
"id": 12, | ||
"type": "B", | ||
"label": "B Node " | ||
} | ||
], | ||
|
||
"edges": [ | ||
{ "from": 0, "to": 1 }, | ||
{ "from": 1, "to": 2 }, | ||
{ "from": 1, "to": 3 }, | ||
{ "from": 1, "to": 4 }, | ||
{ "from": 2, "to": 5 }, | ||
{ "from": 3, "to": 6 }, | ||
{ "from": 4, "to": 7 }, | ||
{ "from": 4, "to": 8 }, | ||
{ "from": 4, "to": 9 }, | ||
{ "from": 4, "to": 10 }, | ||
{ "from": 4, "to": 11 }, | ||
{ "from": 4, "to": 12 } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import NO_FIXED_NO_POSITIONS from "./initial-positioning.no-fixed-no-positions.json"; | ||
import NO_FIXED_SOME_POSITIONS from "./initial-positioning.no-fixed-some-positions.json"; | ||
import SOME_FIXED_SOME_POSITIONS from "./initial-positioning.some-fixed-some-positions.json"; | ||
|
||
context("Initial positioning", (): void => { | ||
it("Nothing fixed, no positions", function (): void { | ||
cy.visSimpleCanvasSnapshot( | ||
"no-fixed-no-positions", | ||
{ ...NO_FIXED_NO_POSITIONS }, | ||
{ requireNewerVersionThan: "8.3.0" } | ||
); | ||
}); | ||
|
||
it("Nothing fixed, some positions", function (): void { | ||
cy.visSimpleCanvasSnapshot( | ||
"no-fixed-some-positions", | ||
{ ...NO_FIXED_SOME_POSITIONS }, | ||
{ requireNewerVersionThan: "8.3.0" } | ||
); | ||
}); | ||
|
||
it("Some fixed, some positions", function (): void { | ||
cy.visSimpleCanvasSnapshot( | ||
"some-fixed-some-positions", | ||
{ ...SOME_FIXED_SOME_POSITIONS }, | ||
{ requireNewerVersionThan: "8.3.0" } | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters