Merge pull request #805 from ONLYOFFICE/feature/bugfix

Fix compactHeader mode
This commit is contained in:
Julia Radzhabova 2021-04-12 19:17:49 +03:00 committed by GitHub
commit 00fc882d86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -221,13 +221,15 @@ define([
'</div>');
}
var $parent = this.labelDocName.parent();
var _left_width = $parent.position().left,
_right_width = $parent.next().outerWidth();
if (!config.isEdit || !config.customization || !config.customization.compactHeader) {
var $parent = this.labelDocName.parent();
var _left_width = $parent.position().left,
_right_width = $parent.next().outerWidth();
if ( _left_width < _right_width )
this.labelDocName.parent().css('padding-left', _right_width - _left_width);
else this.labelDocName.parent().css('padding-right', _left_width - _right_width);
if ( _left_width < _right_width )
this.labelDocName.parent().css('padding-left', _right_width - _left_width);
else this.labelDocName.parent().css('padding-right', _left_width - _right_width);
}
}
}