[Representation] Rebuild scopes on every change
Create new scopes on every changeTemplate request, even if the same template is being viewed; presume that we want a new instance of the same template. Avoids scope reuse for cases such as switching from a plot of one object to a plot of another object.
This commit is contained in:
@@ -131,7 +131,6 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeTemplate(templateUrl) {
|
function changeTemplate(templateUrl) {
|
||||||
if (templateUrl !== activeTemplateUrl) {
|
|
||||||
if (templateUrl) {
|
if (templateUrl) {
|
||||||
addElement();
|
addElement();
|
||||||
self.load(templateUrl).then(function (template) {
|
self.load(templateUrl).then(function (template) {
|
||||||
@@ -147,7 +146,6 @@ define(
|
|||||||
}
|
}
|
||||||
activeTemplateUrl = templateUrl;
|
activeTemplateUrl = templateUrl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (templateUrl) {
|
if (templateUrl) {
|
||||||
changeTemplate(templateUrl);
|
changeTemplate(templateUrl);
|
||||||
|
|||||||
Reference in New Issue
Block a user