Test snap with geographic coordinates

This commit is contained in:
Tim Schaub
2019-09-27 14:12:10 +02:00
parent 07678d960a
commit a996d62d46
2 changed files with 91 additions and 0 deletions

17
test/spec/util.js Normal file
View File

@@ -0,0 +1,17 @@
export function overrideRAF() {
const raf = window.requestAnimationFrame;
const caf = window.cancelAnimationFrame;
window.requestAnimationFrame = function(callback) {
return setTimeout(callback, 1);
};
window.cancelAnimationFrame = function(key) {
return clearTimeout(key);
};
return function() {
window.requestAnimationFrame = raf;
window.cancelAnimationFrame = caf;
};
}