diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-08 20:12:38 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-08 20:12:38 +0100 |
commit | 85355e98e645698b9433674be7ad01b49fc8f20c (patch) | |
tree | d97d5824d44969e674631cf3f6cbd04970645f9a /apps/files/js/breadcrumb.js | |
parent | aea30e0004bed8f2a36f0c1e79aa16abe884a7d2 (diff) | |
download | nextcloud-server-85355e98e645698b9433674be7ad01b49fc8f20c.tar.gz nextcloud-server-85355e98e645698b9433674be7ad01b49fc8f20c.zip |
Fixed tests and width calculation
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/breadcrumb.js')
-rw-r--r-- | apps/files/js/breadcrumb.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js index e548084f33f..ccdecbe8204 100644 --- a/apps/files/js/breadcrumb.js +++ b/apps/files/js/breadcrumb.js @@ -260,7 +260,7 @@ for (var i = 0; i < this.breadcrumbs.length; i++ ) { var $crumb = $(this.breadcrumbs[i]); if(!$crumb.hasClass('hidden') || ignoreHidden === true) { - totalWidth += $crumb.width(); + totalWidth += $crumb.outerWidth(); } } return totalWidth; @@ -329,10 +329,11 @@ // Used for testing since this.$el.parent fails if (!this.availableWidth) { - this.usedWidth = this.$el.parent().width(); + this.usedWidth = this.$el.parent().width() - this.$el.next('.actions').width(); } else { this.usedWidth = this.availableWidth; } + console.log(this.usedWidth, this.getTotalWidth()); // If container is smaller than content // AND if there are crumbs left to hide |