diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-02-27 13:59:09 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-03-01 20:33:14 +0100 |
commit | 83b50690a854a1fac9f9df885008100cb526df6c (patch) | |
tree | 8c82dc8d773f76d2c62ee80e69ec5977b02750a9 /apps/files/js | |
parent | 89c0a0733fef2c7a58ba8b41c95811596c603757 (diff) | |
download | nextcloud-server-83b50690a854a1fac9f9df885008100cb526df6c.tar.gz nextcloud-server-83b50690a854a1fac9f9df885008100cb526df6c.zip |
Take padding and margins of crumbs into account
When calculating the total width of the crumbs only its padding was
taken into account; now the margin is too. In a similar way, before
showing a crumb only its width was taken into account; now its padding
and margin are taken into account too.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/breadcrumb.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js index 347d5a5dd0d..e4951958ad9 100644 --- a/apps/files/js/breadcrumb.js +++ b/apps/files/js/breadcrumb.js @@ -249,7 +249,7 @@ for (var i = 0; i < this.breadcrumbs.length; i++ ) { var $crumb = $(this.breadcrumbs[i]); if(!$crumb.hasClass('hidden') || ignoreHidden === true) { - totalWidth += $crumb.outerWidth(); + totalWidth += $crumb.outerWidth(true); } } return totalWidth; @@ -344,7 +344,7 @@ // If container is bigger than content + element to be shown // AND if there is at least one hidden crumb while (this.$el.find('.crumb.hidden').length > 0 - && this.getTotalWidth() + this._getCrumbElement().width() < availableWidth) { + && this.getTotalWidth() + this._getCrumbElement().outerWidth(true) < availableWidth) { this._showCrumb(); } |