diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-02-19 20:46:49 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-02-28 15:03:26 +0100 |
commit | a828e7b12a157d4636f5659856f45982c9cc1621 (patch) | |
tree | bdc3a12d045b8659b17c7f6847112a84677d6e8f /apps/files | |
parent | a9552de089b7d587ffa94b79560436a1f65c2ea8 (diff) | |
download | nextcloud-server-a828e7b12a157d4636f5659856f45982c9cc1621.tar.gz nextcloud-server-a828e7b12a157d4636f5659856f45982c9cc1621.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.js | 6 |
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(); } |