mirror of
https://github.com/maputnik/editor.git
synced 2026-06-22 23:27:26 +00:00
Initial work to reorder zoom fields.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* A unique id for the current document.
|
||||
*/
|
||||
let REF = 0;
|
||||
|
||||
export default function(prefix="") {
|
||||
REF++;
|
||||
return prefix+REF;
|
||||
}
|
||||
@@ -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