Added button to maximise the output window

This commit is contained in:
n1474335 2016-12-20 20:18:16 +00:00
parent a9f15b2c64
commit 9c1fb7ddf4
14 changed files with 328 additions and 98 deletions

View file

@ -205,14 +205,14 @@ HTMLApp.prototype.populate_operations_list = function() {
* Sets up the adjustable splitter to allow the user to resize areas of the page.
*/
HTMLApp.prototype.initialise_splitter = function() {
Split(["#operations", "#recipe", "#IO"], {
this.column_splitter = Split(["#operations", "#recipe", "#IO"], {
sizes: [20, 30, 50],
minSize: [240, 325, 500],
gutterSize: 4,
onDrag: this.manager.controls.adjust_width.bind(this.manager.controls)
});
Split(["#input", "#output"], {
this.io_splitter = Split(["#input", "#output"], {
direction: "vertical",
gutterSize: 4,
});
@ -463,11 +463,8 @@ HTMLApp.prototype.set_recipe_config = function(recipe_config) {
* Resets the splitter positions to default.
*/
HTMLApp.prototype.reset_layout = function() {
document.getElementById("operations").style.width = "calc(20% - 2px)";
document.getElementById("recipe").style.width = "calc(30% - 4px)";
document.getElementById("IO").style.width = "calc(50% - 2px)";
document.getElementById("input").style.height = "calc(50% - 2px)";
document.getElementById("output").style.height = "calc(50% - 2px)";
this.column_splitter.setSizes([20, 30, 50]);
this.io_splitter.setSizes([50, 50]);
this.manager.controls.adjust_width();
};