[Fixed Position] Refresh subscriptions

Refresh subscriptions when composition changes, such as due to
a drag-drop addition of an element to the view. WTD-877.
This commit is contained in:
Victor Woeltjen
2015-02-17 10:34:13 -08:00
parent 136dddab86
commit 553101100b
2 changed files with 16 additions and 8 deletions

View File

@@ -113,7 +113,7 @@ define(
it("configures view based on model", function () {
mockScope.model = testModel;
findWatch("model")(mockScope.model);
findWatch("model.composition")(mockScope.model.composition);
// Should have styles for all elements of composition
expect(controller.getStyle('a')).toBeDefined();
expect(controller.getStyle('b')).toBeDefined();
@@ -126,7 +126,7 @@ define(
mockScope.domainObject = mockDomainObject;
mockScope.model = testModel;
findWatch("domainObject")(mockDomainObject);
findWatch("model")(mockScope.model);
findWatch("model.composition")(mockScope.model.composition);
// Invoke the subscription callback
mockSubscriber.subscribe.mostRecentCall.args[1]();
@@ -148,7 +148,7 @@ define(
};
mockScope.model = testModel;
findWatch("model")(mockScope.model);
findWatch("model.composition")(mockScope.model.composition);
// Set first bounds
controller.setBounds(s1);