diff --git a/modules/core/map/js/farmOS.map.behaviors.popup.js b/modules/core/map/js/farmOS.map.behaviors.popup.js index 79c8b499..36c0e425 100644 --- a/modules/core/map/js/farmOS.map.behaviors.popup.js +++ b/modules/core/map/js/farmOS.map.behaviors.popup.js @@ -47,6 +47,9 @@ return content; }); }, - weight: 100, + + // Make sure this runs early so other behaviors can dispatch popup events + // with instance.popup.on(). + weight: -100, }; }()); diff --git a/modules/ui/map/js/farmOS.map.behaviors.asset_type_layers.js b/modules/ui/map/js/farmOS.map.behaviors.asset_type_layers.js index 0473c52f..caca7e77 100644 --- a/modules/ui/map/js/farmOS.map.behaviors.asset_type_layers.js +++ b/modules/ui/map/js/farmOS.map.behaviors.asset_type_layers.js @@ -104,9 +104,6 @@ }); } }); - }, - - // Make sure this runs after farmOS.map.behaviors.popup. - weight: 101, + } }; }());