|
|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
import options from "./options.js";
|
|
|
|
|
import Split from "split.js"
|
|
|
|
|
|
|
|
|
|
export const DEFAULT_GUTTER_SIZE = 5;
|
|
|
|
|
|
|
|
|
|
let leftInstance: ReturnType<typeof Split> | null;
|
|
|
|
|
let rightInstance: ReturnType<typeof Split> | null;
|
|
|
|
|
|
|
|
|
|
@ -26,7 +28,7 @@ function setupLeftPaneResizer(leftPaneVisible: boolean) {
|
|
|
|
|
if (leftPaneVisible) {
|
|
|
|
|
leftInstance = Split(["#left-pane", "#rest-pane"], {
|
|
|
|
|
sizes: [leftPaneWidth, 100 - leftPaneWidth],
|
|
|
|
|
gutterSize: 5,
|
|
|
|
|
gutterSize: DEFAULT_GUTTER_SIZE,
|
|
|
|
|
onDragEnd: (sizes) => options.save("leftPaneWidth", Math.round(sizes[0]))
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -54,7 +56,7 @@ function setupRightPaneResizer() {
|
|
|
|
|
if (rightPaneVisible) {
|
|
|
|
|
rightInstance = Split(["#center-pane", "#right-pane"], {
|
|
|
|
|
sizes: [100 - rightPaneWidth, rightPaneWidth],
|
|
|
|
|
gutterSize: 5,
|
|
|
|
|
gutterSize: DEFAULT_GUTTER_SIZE,
|
|
|
|
|
minSize: [ 300, 180 ],
|
|
|
|
|
onDragEnd: (sizes) => options.save("rightPaneWidth", Math.round(sizes[1]))
|
|
|
|
|
});
|
|
|
|
|
|