You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We provide an addPopup() method on map instances, which initializes a new Popup and dispatches a custom farmOS-map.popup event when a singleclick is performed on the map. However, it doesn't pass the click coordinate into the farmOS-map.popup, so that coordinate isn't available to other behaviors who want to hook into the popup display.
@symbioquine mentioned we might be able to just change the event.type to be `farmOS-map.popup' and pass on the original event attributes. We just need to make sure we don't loose any of the existing attributes at the same time
We provide an
addPopup()
method on map instances, which initializes a newPopup
and dispatches a customfarmOS-map.popup
event when asingleclick
is performed on the map. However, it doesn't pass the click coordinate into thefarmOS-map.popup
, so that coordinate isn't available to other behaviors who want to hook into the popup display.For example, the
event
on this line:https://github.com/farmOS/farmOS/blob/fc77c86abe6b142702e7b103cd85e0c207333b79/modules/core/ui/map/js/farmOS.map.behaviors.asset_type_layers.js#L91
Is NOT the same
event
as this one:farmOS-map/src/instance/methods/popup.js
Line 16 in 777758f
... so
event.coordinate
is not accessible in the downstream behavior.The text was updated successfully, but these errors were encountered: