Skip to content

Pass click coordinate into farmOS-map.popup event #176

@mstenta

Description

@mstenta

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.

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:

popup.show(event.coordinate, content);

... so event.coordinate is not accessible in the downstream behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions