mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 10:46:42 +00:00
Merge pull request #942 from nasa/persist-graph-toggles-908
[Timeline] Persist resource graph toggles
This commit is contained in:
commit
6fb36374f6
@ -29,7 +29,7 @@
|
||||
}">
|
||||
<div class="l-cols">
|
||||
<span class="l-col l-col-icon l-plot-resource"
|
||||
ng-click="ngModel.toggleGraph()"
|
||||
ng-click="ngModel.toggleGraph(); parameters.commit()"
|
||||
title="Click to enable or disable inclusion in Resource Graphing">
|
||||
<span class="ui-symbol"
|
||||
ng-show="ngModel.graph()"
|
||||
|
@ -43,6 +43,7 @@
|
||||
<div class="t-swimlanes-holder l-swimlanes-holder"
|
||||
mct-scroll-y="scroll.y">
|
||||
<mct-include key="'timeline-tabular-swimlane-cols-tree'"
|
||||
parameters="{ commit: commit }"
|
||||
ng-repeat="swimlane in timelineController.swimlanes()"
|
||||
ng-model="swimlane">
|
||||
</mct-include>
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user