mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-31 16:11:33 +02:00
Zones Selector sorted by zone names
This change makes the Zones Selector sorted by zone names. To address issue: renderWithZones: zone list incorrectly sorted. #354 (But this doesn't fix the problem with the scrolling)
This commit is contained in:
parent
9c96136312
commit
3a0c4e1477
1 changed files with 12 additions and 0 deletions
|
@ -2905,7 +2905,19 @@ function getExistingZoneList() {
|
||||||
};
|
};
|
||||||
listExistingZones.push(thisZone);
|
listExistingZones.push(thisZone);
|
||||||
}
|
}
|
||||||
|
listExistingZones.sort(GetSortOrder("name"));
|
||||||
return listExistingZones;
|
return listExistingZones;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetSortOrder(sortProperty) {
|
||||||
|
return function(a, b) {
|
||||||
|
if (a[sortProperty] > b[sortProperty]) {
|
||||||
|
return 1;
|
||||||
|
} else if (a[sortProperty] < b[sortProperty]) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}()); // END LOCAL_SCOPE
|
}()); // END LOCAL_SCOPE
|
||||||
|
|
Loading…
Reference in a new issue