mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
**Why?** It should be possible to leverage the farm_map module's extension mechanism and default styling without necessarily giving it full control over when the map instance gets created. Currently, the FarmMap render element uses the 'farm-map' CSS class to inform the JS code in `farm_map.js` that it should instantiate the map. This is problematic since that CSS class is also used for styling and there's a bunch of code in the FarmMap render element and in `farm_map.js` which should be common to pretty much all farmOS maps. To fix that, this change introduces a new [data attribute] which is used instead of the CSS class to signal the JS code in `farm_map.js` that it should actually instantiate the map. [data attribute]: https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes |
||
---|---|---|
.. | ||
asset | ||
core | ||
log | ||
quantity | ||
taxonomy | ||
ui |