fix(mermaid): split on vertical layout

This commit is contained in:
Elian Doran 2025-03-22 10:36:54 +02:00
parent 4860594758
commit afa865765b
No known key found for this signature in database

View File

@ -164,8 +164,13 @@ export default abstract class AbstractSplitTypeWidget extends TypeWidget {
return;
}
let elements = [ this.$firstCol[0], this.$secondCol[0] ];
if (this.layoutOrientation === "vertical") {
elements.reverse();
}
this.splitInstance?.destroy();
this.splitInstance = Split([ this.$firstCol[0], this.$secondCol[0] ], {
this.splitInstance = Split(elements, {
sizes: [ 50, 50 ],
direction: this.layoutOrientation,
gutterSize: DEFAULT_GUTTER_SIZE,