Interactive interface for browsing global, full-resolution satellite imagery
adjust fly animation timing for faster zoom on nearby events
Ed Plato8b7faf80e3f5
diff --git a/web/js/map/animate.js b/web/js/map/animate.jsindex 33ec57858..8cc3ab0a1 100644--- a/web/js/map/animate.js+++ b/web/js/map/animate.js@@ -23,7 +23,7 @@ export function mapAnimate(models, config, ui) {var line = new OlGeomLineString([startPoint, endPoint]);var distance = line.getLength(); // In map units, which is usually degreesvar distanceDuration = polarProjectionCheck ? distance / 50000 : distance; // limit large polar projection distances from coordinate transforms- var duration = Math.floor((distanceDuration * 15) + 800); // 4.6 seconds to go 360 degrees+ var duration = Math.floor((distanceDuration * 20) + 1000); // approx 6 seconds to go 360 degreesvar animationPromise = function () {var args = Array.prototype.slice.call(arguments);return new Promise(function (resolve, reject) {@@ -35,6 +35,8 @@ export function mapAnimate(models, config, ui) {}).catch(function () {});};if (hasEndInView) {+ // allow faster fly with nearby events+ duration = duration < 1200 ? duration / 2 : duration;// If the event is already visible, don't zoom outreturn Promise.all([animationPromise({ center: endPoint, duration: duration }),