diff --git a/platform/features/timeline/res/templates/tabular-swimlane-cols-tree.html b/platform/features/timeline/res/templates/tabular-swimlane-cols-tree.html index e5ca69e15c..22c4a84229 100644 --- a/platform/features/timeline/res/templates/tabular-swimlane-cols-tree.html +++ b/platform/features/timeline/res/templates/tabular-swimlane-cols-tree.html @@ -29,7 +29,7 @@ }">
diff --git a/platform/representation/src/MCTRepresentation.js b/platform/representation/src/MCTRepresentation.js index 331139b793..953ed7cf5a 100644 --- a/platform/representation/src/MCTRepresentation.js +++ b/platform/representation/src/MCTRepresentation.js @@ -177,10 +177,6 @@ define( // representation to store local variables into. $scope.representation = {}; - // Change templates (passing in undefined to clear - // if we don't have enough info to show a template.) - changeTemplate(canRepresent ? representation : undefined); - // Any existing representers are no longer valid; release them. destroyRepresenters(); @@ -226,6 +222,10 @@ define( // next change object/key pair changes toClear = uses.concat(['model']); } + + // Change templates (passing in undefined to clear + // if we don't have enough info to show a template.) + changeTemplate(canRepresent ? representation : undefined); } // Update the representation when the key changes (e.g. if a diff --git a/platform/representation/test/MCTRepresentationSpec.js b/platform/representation/test/MCTRepresentationSpec.js index b5e78fec2a..1e0a83e9a8 100644 --- a/platform/representation/test/MCTRepresentationSpec.js +++ b/platform/representation/test/MCTRepresentationSpec.js @@ -194,6 +194,21 @@ define( .toHaveBeenCalledWith(testViews[1]); }); + it("exposes configuration before changing templates", function () { + var observedConfiguration; + + mockChangeTemplate.andCallFake(function () { + observedConfiguration = mockScope.configuration; + }); + + mockScope.key = "xyz"; + mockScope.domainObject = mockDomainObject; + fireWatch('key', mockScope.key); + fireWatch('domainObject', mockDomainObject); + + expect(observedConfiguration).toBeDefined(); + }); + it("does not load templates until there is an object", function () { mockScope.key = "xyz";