mirror of
https://github.com/nasa/openmct.git
synced 2025-04-09 04:14:32 +00:00
[Views] Clear regions on destroy
Clear regions when a view is destroyed. This causes a view's destroy method to be correctly invoked, allowing views to do cleanup. Used by NSS heatmap view for sprint Alice, https://github.com/nasa/openmct/projects/1
This commit is contained in:
parent
a2e424203a
commit
e59020fec7
@ -33,6 +33,7 @@ define([
|
||||
link: function (scope, element, attrs) {
|
||||
var region = new Region(element[0]);
|
||||
scope.$watch(attrs.mctView, region.show.bind(region));
|
||||
scope.$on("$destroy", region.clear.bind(region));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user