3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Update core map behaviors to properly depend on core/drupalSettings. #578

This commit is contained in:
Paul Weidner 2022-09-27 14:14:02 -07:00
parent c0cedaf884
commit c2290744a9
6 changed files with 9 additions and 6 deletions

View file

@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Update farmOS-map to [v2.0.5](https://github.com/farmOS/farmOS-map/releases/tag/v2.0.5) to fix [Uncaught (in promise) TypeError: o.getChangeEventType is not a function #551](https://github.com/farmOS/farmOS/issues/551)
- [Fix [warning] Invalid argument supplied for foreach() EntityViewsDataTaxonomyFilterTrait.php:26 #575](https://github.com/farmOS/farmOS/pull/575)
- [Set reduce_duplicates: true in Views exposed filters for multivalue fields #571](https://github.com/farmOS/farmOS/pull/571)
- [Update core map behaviors to properly depend on core/drupalSettings #578](https://github.com/farmOS/farmOS/pull/578)
## [2.0.0-beta6] 2022-07-30

View file

@ -23,6 +23,7 @@ farm_map:
js:
js/farm_map.js: { }
dependencies:
- core/drupalSettings
- farm_map/farmOS-map
behavior_wkt:
js:

View file

@ -1,4 +1,4 @@
(function (Drupal) {
(function (Drupal, drupalSettings) {
Drupal.behaviors.farm_map = {
attach: function (context, settings) {
context.querySelectorAll('[data-map-instantiator="farm_map"]').forEach(function (element) {
@ -79,4 +79,4 @@
}
};
}(Drupal));
}(Drupal, drupalSettings));

View file

@ -1,4 +1,4 @@
(function () {
(function (drupalSettings) {
farmOS.map.behaviors.mapbox = {
attach: function (instance) {
var key = drupalSettings.farm_map.behaviors.mapbox.api_key;
@ -27,4 +27,4 @@
instance.addLayer('xyz', opts);
}
};
}());
}(drupalSettings));

View file

@ -9,5 +9,6 @@ behavior_asset_type_layers:
js:
js/farmOS.map.behaviors.asset_type_layers.js: { }
dependencies:
- core/drupalSettings
- farm_ui_map/map_popup_iframe
- farm_map/farm_map

View file

@ -1,4 +1,4 @@
(function () {
(function (drupalSettings) {
farmOS.map.behaviors.asset_type_layers = {
attach: function (instance) {
@ -110,4 +110,4 @@
});
}
};
}());
}(drupalSettings));