Destroy farmOS-map instances when Drupal behaviors are detached.
This commit is contained in:
parent
18e86f9550
commit
c3ca0cc041
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue