Commit 52219265 authored by Yohan Boniface's avatar Yohan Boniface

Natural layer order is now reversed, so next is previous and vice versa

fix umap-project/umap#413
parent 5ebbbd88
......@@ -931,7 +931,7 @@ L.Storage.DataLayer = L.Class.extend({
return previousId? this._layers[previousId]: this.getPreviousBrowsable().getFeatureByIndex(-1);
},
getNextBrowsable: function () {
getPreviousBrowsable: function () {
var id = this.getRank(), next, index = this.map.datalayers_index;
while(id = index[++id] ? id : 0, next = index[id]) {
if (next === this || next.allowBrowse()) break;
......@@ -939,7 +939,7 @@ L.Storage.DataLayer = L.Class.extend({
return next;
},
getPreviousBrowsable: function () {
getNextBrowsable: function () {
var id = this.getRank(), prev, index = this.map.datalayers_index;
while(id = index[--id] ? id : index.length - 1, prev = index[id]) {
if (prev === this || prev.allowBrowse()) break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment