Bladeren bron

Keep config boxes in view on wide screen

Scott Lahteine 9 jaren geleden
bovenliggende
commit
5d0c93ae10
2 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  1. 1
    0
      Marlin/configurator/css/configurator.css
  2. 6
    0
      Marlin/configurator/js/configurator.js

+ 1
- 0
Marlin/configurator/css/configurator.css Bestand weergeven

@@ -300,4 +300,5 @@ a.download {
300 300
 
301 301
 	#config_text, #config_adv_text { float: right; clear: right; width: 45%; }
302 302
 
303
+	pre.config { height: 20em; }
303 304
 }

+ 6
- 0
Marlin/configurator/js/configurator.js Bestand weergeven

@@ -186,6 +186,12 @@ var configuratorApp = (function(){
186 186
           : $pre.slideUp(200, didAnim);
187 187
       });
188 188
 
189
+      // Fix the config boxes on the screen (in wide style)
190
+      $(window).bind('scroll resize', function(){
191
+        var $cfg = $('#config_text'), wtop = $(window).scrollTop(), ctop = $cfg.offset().top;
192
+        $cfg.css({ paddingTop: ctop < $form.offset().top+100 && wtop > ctop ? wtop-ctop : 0 });
193
+      });
194
+
189 195
       // Read boards.h, Configuration.h, Configuration_adv.h
190 196
       var ajax_count = 0, success_count = 0;
191 197
       var loaded_items = {};

Laden…
Annuleren
Opslaan