Skip to content

Commit ff5be6b

Browse files
committed
fix: network-viz has a bug, implementing workarround to set height in horizontal layout
1 parent fab5c8a commit ff5be6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/GraphPlugin.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ class GraphPlugin {
119119
options
120120
);
121121

122+
// Workaround for vis-network height bug - adjust based on YASGUI layout
123+
this.network.once('afterDrawing', () => {
124+
// Check if horizontal layout is active
125+
const isHorizontal = document.querySelector('.orientation-horizontal') !== null;
126+
container.style.height = isHorizontal ? '80vh' : '50vh';
127+
});
128+
122129
// Track network readiness
123130
this.networkReady = false;
124131

0 commit comments

Comments
 (0)