@CommanderStorm approved this pull request.

If you want to abstract this away, I can adjust the rest of the code I wrote.

Do note that for the abstractions you are writing there are no docs anywhere, 
which will be harder for other developers without reading your code over time.
There is a cost to doing it this way, but if you are willing to pay that 
"weirdness" tax, then that is fine.

> +    const rotationOptions = {};
+    if (allowRotation === false) {
+      Object.assign(rotationOptions, {
+        rollEnabled: false,
+        dragRotate: false,
+        pitchWithRotate: false,
+        bearingSnap: 180
+      });

I would argue against API abstractions like this, since without any 
documentation how the code works this is otherwise reasonably hard to think 
about what is actually happening.
This rails thingy with the weird not quite working imports where one never 
knows what code runs where and where it comes from is already a high bar, no 
need to be even more weird.

Your call though, if you want your world to look like this, I am the last 
person to stop you.

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

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

Reply via email to