From 6d7ef4c60529d94747525d3bb0f1d58a34290d9c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 12 Apr 2021 19:13:31 +0300 Subject: [PATCH] Fix compactHeader mode --- apps/common/main/lib/view/Header.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 12a20e1bb..cf2ef9395 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -221,13 +221,15 @@ define([ ''); } - 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); + } } }