Fixed 'Maximise output' button functionality
parent
3a6b2875d5
commit
cb9ab7a2c9
|
@ -238,12 +238,18 @@ class App {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the adjustable splitter to allow the user to resize areas of the page.
|
* Sets up the adjustable splitter to allow the user to resize areas of the page.
|
||||||
|
*
|
||||||
|
* @param {boolean} [minimise=false] - Set this flag if attempting to minimuse frames to 0 width
|
||||||
*/
|
*/
|
||||||
initialiseSplitter() {
|
initialiseSplitter(minimise=false) {
|
||||||
|
if (this.columnSplitter) this.columnSplitter.destroy();
|
||||||
|
if (this.ioSplitter) this.ioSplitter.destroy();
|
||||||
|
|
||||||
this.columnSplitter = Split(["#operations", "#recipe", "#IO"], {
|
this.columnSplitter = Split(["#operations", "#recipe", "#IO"], {
|
||||||
sizes: [20, 30, 50],
|
sizes: [20, 30, 50],
|
||||||
minSize: [240, 370, 450],
|
minSize: minimise ? [0, 0, 0] : [240, 370, 450],
|
||||||
gutterSize: 4,
|
gutterSize: 4,
|
||||||
|
expandToMin: false,
|
||||||
onDrag: function() {
|
onDrag: function() {
|
||||||
this.manager.recipe.adjustWidth();
|
this.manager.recipe.adjustWidth();
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
|
@ -251,7 +257,8 @@ class App {
|
||||||
|
|
||||||
this.ioSplitter = Split(["#input", "#output"], {
|
this.ioSplitter = Split(["#input", "#output"], {
|
||||||
direction: "vertical",
|
direction: "vertical",
|
||||||
gutterSize: 4
|
gutterSize: 4,
|
||||||
|
minSize: minimise ? [0, 0] : [100, 100]
|
||||||
});
|
});
|
||||||
|
|
||||||
this.resetLayout();
|
this.resetLayout();
|
||||||
|
|
|
@ -319,6 +319,7 @@ class OutputWaiter {
|
||||||
const el = e.target.id === "maximise-output" ? e.target : e.target.parentNode;
|
const el = e.target.id === "maximise-output" ? e.target : e.target.parentNode;
|
||||||
|
|
||||||
if (el.getAttribute("data-original-title").indexOf("Maximise") === 0) {
|
if (el.getAttribute("data-original-title").indexOf("Maximise") === 0) {
|
||||||
|
this.app.initialiseSplitter(true);
|
||||||
this.app.columnSplitter.collapse(0);
|
this.app.columnSplitter.collapse(0);
|
||||||
this.app.columnSplitter.collapse(1);
|
this.app.columnSplitter.collapse(1);
|
||||||
this.app.ioSplitter.collapse(0);
|
this.app.ioSplitter.collapse(0);
|
||||||
|
@ -328,6 +329,7 @@ class OutputWaiter {
|
||||||
} else {
|
} else {
|
||||||
$(el).attr("data-original-title", "Maximise output pane");
|
$(el).attr("data-original-title", "Maximise output pane");
|
||||||
el.querySelector("i").innerHTML = "fullscreen";
|
el.querySelector("i").innerHTML = "fullscreen";
|
||||||
|
this.app.initialiseSplitter(false);
|
||||||
this.app.resetLayout();
|
this.app.resetLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue