openmct/platform/commonUI/general
Pete Richards f0b9292458 [Tree] Add additional api methods
Add methods to tree view via scope for more fine grained control.

Can supply a "allowSelection" function which should return true
if a given selection is allowed.  This is executed before a node
is selected and allows you to prevent selection.  Before this, if
you wanted to prevent the selection from changing, you had to wait
for it to change and then change it back to the original value.

Can also supply an "onSelection" function which is called when a
value is successfully selected.  This allows you to handle the
selection event without waiting for digest.  You can still $watch
"selectedObject" if you prefer.

Additionally, this changes the tree node to trigger a digest only
when the value is set via a MouseClick, instead of every time.

Tidies up directive scope bindings to clarify usage.

https://github.com/nasa/openmct/issues/1360
2016-12-20 16:43:23 -08:00
..
res [Tree] Add additional api methods 2016-12-20 16:43:23 -08:00
src [Tree] Add additional api methods 2016-12-20 16:43:23 -08:00
test [API] Update StyleSheetLoaderSpec 2016-09-30 10:42:48 -07:00
bundle.js [API] Remove js extension from import 2016-09-30 10:37:31 -07:00
README.md [Common UI] Document mct-scroll-* directives 2015-02-25 16:34:51 -08:00

Directives

  • mct-scroll-x is an attribute whose value is an assignable Angular expression. This two-way binds that expression to the horizontal scroll state of the element on which it is applied.
  • mct-scroll-y is an attribute whose value is an assignable Angular expression. This two-way binds that expression to the vertical scroll state of the element on which it is applied.