Fix to-be-shown algorithm

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-11-08 14:01:57 +01:00
parent ce391eeccb
commit 176ad7670f
No known key found for this signature in database
GPG key ID: FB5ACEED51955BF8

View file

@ -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+')');
},