Fix to-be-shown algorithm
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
ce391eeccb
commit
176ad7670f
1 changed files with 3 additions and 2 deletions
|
@ -249,9 +249,10 @@
|
|||
* Get the crumb to show
|
||||
*/
|
||||
_getCrumbElement: function() {
|
||||
var length = this.$el.find('.crumb.hidden').length;
|
||||
var hidden = this.$el.find('.crumb.hidden').length;
|
||||
var shown = this.$el.find('.crumb:not(.hidden):not(.crumbhome):not(.crumbmenu)').length;
|
||||
// Get the outer one with priority to the highest
|
||||
var elmt = (length % 2) * (length - 1);
|
||||
var elmt = (1 - shown % 2) * (hidden - 1);
|
||||
return this.$el.find('.crumb.hidden:eq('+elmt+')');
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue