summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-02-19 20:46:49 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-03-01 20:33:14 +0100
commit2fd3fa20dffea0c601dce16a146e6bd4f73a5fb2 (patch)
tree169048fa5db8c1716672a3312d4760b360ddc34d /apps/files
parent61bd3631d94ad1b764fe04a74a8fbc1552e0133b (diff)
downloadnextcloud-server-2fd3fa20dffea0c601dce16a146e6bd4f73a5fb2.tar.gz
nextcloud-server-2fd3fa20dffea0c601dce16a146e6bd4f73a5fb2.zip
Replace attribute with local variable
The "usedWidth" attribute was not used elsewhere outside the "_resize" method, so it was replaced with a local variable. Moreover, it was also renamed to a more suitable name ("availableWidth"). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/js/breadcrumb.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js
index fe8e54c3a6c..c02ed488da0 100644
--- a/apps/files/js/breadcrumb.js
+++ b/apps/files/js/breadcrumb.js
@@ -316,18 +316,18 @@
return;
}
- this.usedWidth = this.$el.parent().width() - this.$el.parent().find('.actions.creatable').width();
+ var availableWidth = this.$el.parent().width() - this.$el.parent().find('.actions.creatable').width();
// If container is smaller than content
// AND if there are crumbs left to hide
- while (this.getTotalWidth() > this.usedWidth
+ while (this.getTotalWidth() > availableWidth
&& this.$el.find(this.crumbSelector).length > 0) {
this._hideCrumb();
}
// 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() < this.usedWidth) {
+ && this.getTotalWidth() + this._getCrumbElement().width() < availableWidth) {
this._showCrumb();
}