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:
parent
18e86f9550
commit
c3ca0cc041
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue