@tomhughes commented on this pull request.
> + 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.
We can argue about the details of how it is implemented but I think the basic
principle of not repeating the same code to initialise a map multiple times is
good.
> 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.
To be clear that's because we're using quite an old way of managing assets that
works by textual inclusion/composition and a modern rails way of doing things
would use ES6 imports and avoid the problems you're referring to.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6726#discussion_r2706039689
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