145 Commits

Author SHA1 Message Date
Victor Woeltjen
e453868994 [Representation] Bind mct-model without aliasing 2015-12-02 15:38:17 -08:00
Victor Woeltjen
a16cb16c31 [Representation] Update JSDoc
...to reflect transition from ng-model to mct-model.
2015-12-02 15:24:21 -08:00
Victor Woeltjen
b5fb2176e9 [Representation] Update specs
...to verify that both mct-model and ng-model are used.
2015-12-02 15:16:45 -08:00
Victor Woeltjen
70e11d66e1 [Representation] Use mct-model instead of ng-model
...to avoid extraneous watches introduced by ng-model.

https://github.com/nasa/openmctweb/issues/313
2015-12-02 14:52:37 -08:00
Victor Woeltjen
a039b9b5fe [Representation] Test OneWayBinder 2015-12-02 14:36:26 -08:00
Victor Woeltjen
5fdffee9a5 [Representation] Add spec for OneWayBinder
...with an initial test case.
2015-12-02 14:22:18 -08:00
Victor Woeltjen
1781e9be32 [Representation] Update spec for mct-representation
...to reflect changes to data binding.
2015-12-02 14:11:39 -08:00
Victor Woeltjen
756e445a80 [Representation] Update spec for mct-include
...to reflect changes to data binding.
2015-12-02 13:58:39 -08:00
Victor Woeltjen
b450d36472 [Representation] Add JSDoc to OneWayBinder 2015-12-02 13:23:46 -08:00
Victor Woeltjen
b5d2949b8f [Representation] Handle anonymous objects
Set objectEquality to true for anonymous objects, such that
they are compared using angular.equals instead of tested for
reference equality. This avoids redundant firing of watches
when values within the anonymous object are unchanged.
2015-12-02 13:14:19 -08:00
Victor Woeltjen
c6eb07a810 [Representation] Remove redundant watches 2015-12-02 13:07:37 -08:00
Victor Woeltjen
63ce7349e3 [Representation] Use OneWayBinder from mct-representation 2015-12-02 13:04:51 -08:00
Victor Woeltjen
add4e22cd3 [Representation] Use OneWayBinder from mct-include 2015-12-02 12:56:01 -08:00
Victor Woeltjen
40bd04f455 [Representation] Add one-way binder
...to handle common one-way binding behavior shared by
both mct-include and mct-representation.
2015-12-02 12:52:13 -08:00
Victor Woeltjen
4fee1ee153 [Representation] Do isolate mct-include's scope
...even though we are not using this to pass any state
from attributes inward.
2015-12-02 12:24:26 -08:00
Victor Woeltjen
cfb6d4ccbf [Representation] Pass attributes one way
Instead of two-way binding attributes, only pass them in
from the parent scope. This permits users of mct-include
to use one-time binding to reduce watch counts (two-way
binding across an isolate scope does not permit this.)

https://github.com/nasa/openmctweb/issues/314
2015-12-02 12:22:37 -08:00
Victor Woeltjen
ae928a138c [Representation] Update compilation approach
Update compilation approach for templateLinker to more
closely resemble ng-include; minimizes likelihood of
subtle behavioral differences (e.g. incorrect size
selection for split pane)
2015-10-30 16:37:47 -07:00
Victor Woeltjen
454a63e1f1 [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.
2015-10-30 16:18:01 -07:00
Victor Woeltjen
b487fa4438 [Representation] Update TemplateLinker spec
...to reflect creation of a new scope each time a template
is changed.
2015-10-30 16:01:24 -07:00
Victor Woeltjen
560454e7c2 [Representation] Verify change before representing
An mct-representation may have a refresh triggered either by
a key change or a domain object change; both will typically
happen in the same digest cycle. Track what prior state was
an abort refreshes if nothing will change.
2015-10-30 15:55:56 -07:00
Victor Woeltjen
04594ea536 [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.
2015-10-30 15:32:20 -07:00
Victor Woeltjen
a45dfc3822 [Representation] Don't reuse scopes
Addresses nasa/openmctweb#227
2015-10-30 15:09:35 -07:00
Victor Woeltjen
4abb48abd8 [Representation] Update parameters in JSDoc 2015-10-30 13:34:13 -07:00
Victor Woeltjen
a38d4829eb [Representation] Add JSDoc 2015-10-30 12:38:32 -07:00
Victor Woeltjen
d5f1d45759 [Representation] Use $templateRequest
...from templateLinker, to remove the need to use $http and
to explicitly cache templates.
2015-10-30 12:35:36 -07:00
Victor Woeltjen
5ed34c1c30 [Representation] Build URLs from templateLinker 2015-10-30 11:02:13 -07:00
Victor Woeltjen
5b475c9f64 [Representation] Add more test cases
...for TemplateLinker.
2015-10-29 08:27:20 -07:00
Victor Woeltjen
a48370abd3 [Representation] Update spec 2015-10-29 08:18:13 -07:00
Victor Woeltjen
54d608adb2 [Representation] Provide initial templates
...to avoid temporarily replacing with a comment when this
is not needed.
2015-10-29 08:17:25 -07:00
Victor Woeltjen
5fba6f5ead [Representation] Add more test cases
...for TemplateLinker, to achieve full code coverage.
2015-10-29 08:08:01 -07:00
Victor Woeltjen
b177c38656 [Representation] Add JSDoc
...to TelemetryLinker.
2015-10-29 07:58:32 -07:00
Victor Woeltjen
59cd346911 [Representation] Add test cases
...for TemplateLinker
2015-10-28 17:01:13 -07:00
Victor Woeltjen
e7e66bff4b [Representation] Begin adding TemplateLinker spec 2015-10-28 16:49:19 -07:00
Victor Woeltjen
ca62cc9066 [Representation] Update spec for mct-representation
...to account for usage of templateLinker to add or remove the
whole element from the DOM when there is or is not a template
to show.
2015-10-28 16:35:11 -07:00
Victor Woeltjen
01b6fda1f2 [Representation] Update spec for mct-include
...to account for usage of templateLinker to add or remove the
whole element from the DOM when there is or is not a template
to show.
2015-10-28 16:11:00 -07:00
Victor Woeltjen
c5fcc5a558 [Representation] Handle edge cases
Handle edge cases (e.g. directive priorities, race conditions)
to ensure that mct-representation and mct-include display correctly
when added to or removed from the DOM.
2015-10-28 15:57:47 -07:00
Victor Woeltjen
0404303042 [Representation] Move changes back
Move changed lines back to their original location to simplify
diff.
2015-10-28 15:38:11 -07:00
Victor Woeltjen
5677548298 [Representation] Show element synchronously
...to avoid exceptions when trying to invoke representers
before an mct-representation has been added back into the
DOM.
2015-10-28 15:32:50 -07:00
Victor Woeltjen
bcc42d705e [Representation] Hide elements without transclusion 2015-10-28 15:30:27 -07:00
Victor Woeltjen
ab008ae497 [Representation] Begin integration
...of templateLinker into mct-representation. Not working currently
due to prevalence of mct-representation instances with transcluding
directives (hitting a multiple transclusion error.)
2015-10-28 15:17:36 -07:00
Victor Woeltjen
3d59f6df0b [Representation] Separate out template loading/linking
...from mct-include, to facilitate reuse for MCTRepresentation.
2015-10-28 14:51:30 -07:00
Victor Woeltjen
b4a44dee8f [Representation] Populate mct-include contents
Remove usage of ng-include and template from mct-include for
compatibility with element-level transclusion. Has useful
side effect of pre-fetching templates and reducing watch
count.
2015-10-28 11:13:53 -07:00
Victor Woeltjen
942f617bd8 [Representation] Use transclusion for mct-include
...to add/remove conditionally depending on the existence of
certain templates.

Note that this currently breaks mct-include due to an incompatibility
between element transclusion and directive templates; see
https://github.com/angular/angular.js/issues/3368.
2015-10-28 10:29:46 -07:00
Victor Woeltjen
757cb0f015 [Representation] Watch for key changes
...from mct-include. Improves behavior of that directive and supports
testing of changes to remove whole elements when inapplicable,
nasa/openmctweb#195.
2015-10-28 10:18:59 -07:00
Victor Woeltjen
13095b4135 [Context Menu] Update specs
Update specs to reflect refactoring-out of popup elements
performed in the context of adding time conductor, WTD-1515.
2015-10-02 14:14:34 -07:00
Victor Woeltjen
445f22ccb0 [Context Menu] Use popupService to display menus 2015-10-02 11:01:49 -07:00
Victor Woeltjen
6bd8e7a47c Merge remote-tracking branch 'github/master' into open1515 2015-09-24 11:17:13 -07:00
Pete Richards
8b7a94dcf8 [Style] Remove unused variables, excess whitespace
Clean up unused variables and excess whitespace to match style guide.
2015-09-22 11:14:55 -07:00
Victor Woeltjen
fa186a1556 [Mobile] Update agentService usages 2015-09-18 10:07:27 -07:00
Victor Woeltjen
29c460556a [Representers] Destroy representers
Invoke the destroy methods of any active representers when
a scope is destroyed; supports time controller, which needs
to accurately track when it has or hasn't been attached to
a view. WTD-1515
2015-09-04 16:00:43 -07:00