Skip to content

Commit

Permalink
Improve graph layout core hack now that types have been fixed upstream (
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Jan 17, 2023
1 parent 4a1b5a8 commit 1ca6525
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -20,7 +20,7 @@
"cache": false
},
"dependencies": {
"@flatten-js/interval-tree": "^1.0.18",
"@flatten-js/interval-tree": "^1.0.20",
"@fortawesome/fontawesome-free": "^6.2.1",
"@sentry/browser": "^7.28.1",
"@sentry/node": "^7.28.1",
Expand Down
8 changes: 2 additions & 6 deletions static/graph-layout-core.ts
Expand Up @@ -655,16 +655,12 @@ export class GraphLayoutCore {
// Throw everything away and do it all again, but smarter
for (const edgeColumn of this.edgeColumns) {
for (const intervalTree of edgeColumn.intervals) {
// Note: Incorrect types in the interval tree library
// After https://github.com/alexbol99/flatten-interval-tree/pull/42 this can be intervalTree.clear()
(intervalTree.root as Node<EdgeSegment> | null) = null;
intervalTree.clear();
}
}
for (const edgeRow of this.edgeRows) {
for (const intervalTree of edgeRow.intervals) {
// Note: Incorrect types in the interval tree library
// After https://github.com/alexbol99/flatten-interval-tree/pull/42 this can be intervalTree.clear()
(intervalTree.root as Node<EdgeSegment> | null) = null;
intervalTree.clear();
}
}
// Edge kind is the primary heuristic for subrow/column assignment
Expand Down

0 comments on commit 1ca6525

Please sign in to comment.