mirror of
https://github.com/maputnik/editor.git
synced 2026-01-06 05:20:01 +00:00
Initial work to reorder zoom fields.
This commit is contained in:
14
src/libs/sort-numerically.js
Normal file
14
src/libs/sort-numerically.js
Normal file
@@ -0,0 +1,14 @@
|
||||
export default function(a, b) {
|
||||
a = parseFloat(a, 10);
|
||||
b = parseFloat(b, 10);
|
||||
|
||||
if(a < b) {
|
||||
return -1
|
||||
}
|
||||
else if(a > b) {
|
||||
return 1
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user