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

Destroy farmOS-map instances when Drupal behaviors are detached.

This commit is contained in:
Michael Stenta 2020-02-02 14:44:11 -05:00
parent 18e86f9550
commit c3ca0cc041

View file

@ -13,6 +13,11 @@
farmOS.map.create($(element).attr('id'), options);
});
});
},
detach: function (context, settings) {
$('.farm-map', context).each(function (index, element) {
farmOS.map.destroy($(element).attr('id'));
});
}
};
}(jQuery));