aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/breadcrumb.js
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2017-11-03 12:53:21 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-08 13:04:38 +0100
commit9bb28bab300192b38d29d4fa2809c719af7d0429 (patch)
tree516d1443a8115199661a62710a1d8abeb412de2d /apps/files/js/breadcrumb.js
parent9422e98151d24e69be06ea3835d96bd409bced6d (diff)
downloadnextcloud-server-9bb28bab300192b38d29d4fa2809c719af7d0429.tar.gz
nextcloud-server-9bb28bab300192b38d29d4fa2809c719af7d0429.zip
Flex to controls
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/breadcrumb.js')
-rw-r--r--apps/files/js/breadcrumb.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js
index 544ad703523..c5cb97d5b4c 100644
--- a/apps/files/js/breadcrumb.js
+++ b/apps/files/js/breadcrumb.js
@@ -226,7 +226,8 @@
* Return the number of items to hide
*/
_toShrink: function() {
- var maxWidth = this.$el.width();
+ var maxWidth = this.$el.parent().width();
+ console.log('Available width:' +maxWidth);
var smallestWidth = 50;
// 50px by default for the ellipsis crumb
return Math.ceil((this.totalWidth + 50 - maxWidth) / smallestWidth);
@@ -240,7 +241,7 @@
_hideCrumbs: function(toHide) {
var min = Math.round(this.breadcrumbs.length/2 - toHide/2);
var max = Math.round(this.breadcrumbs.length/2 + toHide/2 - 1);
- console.log(this.$el.find('.crumb').slice(min, max));
+ console.log('toShrink: '+toHide);
this.$el.find('.crumb').removeClass('hidden')
.slice(min, max).addClass('hidden');
},