@pablobm commented on this pull request.


> @@ -39,14 +38,17 @@ document.addEventListener("DOMContentLoaded", function () 
> {
       parent.postMessage({ type, data }, location.origin);
     }
 
-    id.map().on("move.embed", window.Cowboy.throttle(250, function () {
-      if (id.inIntro()) return;
-      const zoom = ~~id.map().zoom(),
-            center = id.map().center(),
-            llz = { lon: center[0], lat: center[1], zoom: zoom };
+    id.map().on("move.embed-init", function () {
+      id.map().on("move.embed-init", null);

That's an odd line. I'm guessing it's to avoid multiple initialisation? But to 
me that would suggest that there's only one possible handler for this event, is 
that the case?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6811#pullrequestreview-4515626294
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6811/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to