mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 13:28:35 +01:00
Margin removal on minimized / closed state
This commit is contained in:
parent
a238151cab
commit
88ba3c6724
@ -793,7 +793,16 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
this.$el.addClass(csscls('closed'));
|
||||
this.recomputeBottomOffset();
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the panel is closed
|
||||
*
|
||||
* @return {Boolean}
|
||||
*/
|
||||
isClosed: function() {
|
||||
return this.$el.hasClass(csscls('closed'));
|
||||
},
|
||||
|
||||
/**
|
||||
* Restore the debug bar
|
||||
*
|
||||
@ -818,8 +827,12 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
*/
|
||||
recomputeBottomOffset: function() {
|
||||
if (this.options.bodyMarginBottom) {
|
||||
var height = parseInt(this.$el.height()) + this.options.bodyMarginBottomHeight;
|
||||
$('body').css('margin-bottom', height);
|
||||
if (this.isMinimized() || this.isClosed()) {
|
||||
return $('body').css('margin-bottom', this.options.bodyMarginBottomHeight || '');
|
||||
}
|
||||
|
||||
var offset = parseInt(this.$el.height()) + this.options.bodyMarginBottomHeight;
|
||||
$('body').css('margin-bottom', offset);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user