From 5d0c93ae104f7b3216285ba1a4533bd6f66ae582 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Feb 2015 03:41:41 -0800 Subject: [PATCH] Keep config boxes in view on wide screen --- Marlin/configurator/css/configurator.css | 1 + Marlin/configurator/js/configurator.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Marlin/configurator/css/configurator.css b/Marlin/configurator/css/configurator.css index fc54e8e01a..48544de2f9 100644 --- a/Marlin/configurator/css/configurator.css +++ b/Marlin/configurator/css/configurator.css @@ -300,4 +300,5 @@ a.download { #config_text, #config_adv_text { float: right; clear: right; width: 45%; } + pre.config { height: 20em; } } diff --git a/Marlin/configurator/js/configurator.js b/Marlin/configurator/js/configurator.js index a662664366..0092806254 100644 --- a/Marlin/configurator/js/configurator.js +++ b/Marlin/configurator/js/configurator.js @@ -186,6 +186,12 @@ var configuratorApp = (function(){ : $pre.slideUp(200, didAnim); }); + // Fix the config boxes on the screen (in wide style) + $(window).bind('scroll resize', function(){ + var $cfg = $('#config_text'), wtop = $(window).scrollTop(), ctop = $cfg.offset().top; + $cfg.css({ paddingTop: ctop < $form.offset().top+100 && wtop > ctop ? wtop-ctop : 0 }); + }); + // Read boards.h, Configuration.h, Configuration_adv.h var ajax_count = 0, success_count = 0; var loaded_items = {};