-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix polyline misalignment in orth router between nodes (#6040)
- Loading branch information
Showing
3 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
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,32 @@ | ||
import { createGraph } from '@@/utils'; | ||
|
||
describe('element orth router', () => { | ||
it('test polyline orth', async () => { | ||
const graph = createGraph({ | ||
animation: true, | ||
data: { | ||
nodes: [ | ||
{ | ||
id: 'node-1', | ||
style: { x: 310, y: 280, size: 80 }, | ||
}, | ||
{ | ||
id: 'node-2', | ||
style: { x: 300, y: 175 }, | ||
}, | ||
], | ||
edges: [{ id: 'edge-1', source: 'node-1', target: 'node-2' }], | ||
}, | ||
edge: { | ||
type: 'polyline', | ||
style: { | ||
router: true, | ||
}, | ||
}, | ||
}); | ||
|
||
await graph.draw(); | ||
|
||
await expect(graph).toMatchSnapshot(__filename); | ||
}); | ||
}); |
26 changes: 26 additions & 0 deletions
26
packages/g6/__tests__/snapshots/__tests__/bugs/element-orth-router/default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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