mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 18:12:57 +00:00
[Representation] Destroy scopes before adding
Destroy representation scope before adding elements back into the DOM; avoids having a momentary activation of watches and listeners on those scopes before they are replaced with newly compiled content for new scopes.
This commit is contained in:
parent
b487fa4438
commit
454a63e1f1
@ -132,6 +132,7 @@ define(
|
|||||||
|
|
||||||
function changeTemplate(templateUrl) {
|
function changeTemplate(templateUrl) {
|
||||||
if (templateUrl) {
|
if (templateUrl) {
|
||||||
|
destroyScope();
|
||||||
addElement();
|
addElement();
|
||||||
self.load(templateUrl).then(function (template) {
|
self.load(templateUrl).then(function (template) {
|
||||||
// Avoid race conditions
|
// Avoid race conditions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user