From 7cd5b16fc91a8887a1540cc64097452bd7ce7a63 Mon Sep 17 00:00:00 2001 From: Darren Date: Mon, 1 Oct 2012 19:32:36 +0100 Subject: [PATCH] Removed startup flicker; Tidier show/hideBars() --- client_backbone/css/style.css | 4 ++-- client_backbone/dev/view.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/client_backbone/css/style.css b/client_backbone/css/style.css index 1c91e06..f7e92cc 100644 --- a/client_backbone/css/style.css +++ b/client_backbone/css/style.css @@ -16,10 +16,10 @@ a { color:#36C; text-decoration:none; cursor:pointer; } /** * Main layout blocks */ -#toolbar { position:absolute; top:0px; width:100%; background-color:#1B1B1B; font-size:0.9em; } +#toolbar { position:absolute; top:0px; width:100%; background-color:#1B1B1B; font-size:0.9em; display:none; } #panels { position:absolute; left:0px; right:200px; bottom:100px; top:100px; } #memberlists { position:absolute; right:0px; width:200px; bottom:100px; top:100px; overflow-y:auto; } -#controlbox { position: absolute; bottom:0px; width:100%; background-color:#1B1B1B; } +#controlbox { position: absolute; bottom:0px; width:100%; background-color:#1B1B1B; display:none; } diff --git a/client_backbone/dev/view.js b/client_backbone/dev/view.js index 00edbac..13fffa3 100755 --- a/client_backbone/dev/view.js +++ b/client_backbone/dev/view.js @@ -865,11 +865,12 @@ kiwi.view.Application = Backbone.View.extend({ var that = this; if (!instant) { - $('#toolbar').slideUp(); - $('#controlbox').slideUp(function () { that.doLayout(); }); + $('#toolbar').slideUp({queue: false, duration: 400, step: this.doLayout}); + $('#controlbox').slideUp({queue: false, duration: 400, step: this.doLayout}); } else { $('#toolbar').slideUp(0); $('#controlbox').slideUp(0); + this.doLayout(); } }, @@ -877,8 +878,8 @@ kiwi.view.Application = Backbone.View.extend({ var that = this; if (!instant) { - $('#toolbar').slideDown(); - $('#controlbox').slideDown(function () { that.doLayout(); }); + $('#toolbar').slideDown({queue: false, duration: 400, step: this.doLayout}); + $('#controlbox').slideDown({queue: false, duration: 400, step: this.doLayout}); } else { $('#toolbar').slideDown(0); $('#controlbox').slideDown(0); -- 2.25.1