mirror of
https://github.com/nasa/openmct.git
synced 2025-03-23 04:25:27 +00:00
[Common UI] Expose mct-scroll-x, mct-scroll-y
Expose mct-scroll-x and mct-scroll-y directives. WTD-920.
This commit is contained in:
parent
f8b352c4d8
commit
9a88e5172a
@ -105,6 +105,34 @@
|
||||
"key": "mctResize",
|
||||
"implementation": "directives/MCTResize.js",
|
||||
"depends": [ "$timeout" ]
|
||||
},
|
||||
{
|
||||
"key": "mctScrollX",
|
||||
"implementations": "directives/MCTScroll.js",
|
||||
"depends": [ "$parse", "MCT_SCROLL_X_PROPERTY", "MCT_SCROLL_X_ATTRIBUTE" ]
|
||||
},
|
||||
{
|
||||
"key": "mctScrollY",
|
||||
"implementations": "directives/MCTScroll.js",
|
||||
"depends": [ "$parse", "MCT_SCROLL_Y_PROPERTY", "MCT_SCROLL_Y_ATTRIBUTE" ]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "MCT_SCROLL_X_PROPERTY",
|
||||
"value": "scrollLeft"
|
||||
},
|
||||
{
|
||||
"key": "MCT_SCROLL_X_ATTRIBUTE",
|
||||
"value": "mctScrollX"
|
||||
},
|
||||
{
|
||||
"key": "MCT_SCROLL_Y_PROPERTY",
|
||||
"value": "scrollTop"
|
||||
},
|
||||
{
|
||||
"key": "MCT_SCROLL_Y_ATTRIBUTE",
|
||||
"value": "mctScrollY"
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
|
@ -6,12 +6,16 @@ define(
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Superclass of mct-scroll-x and mct-scroll-y directives. Listens
|
||||
* Implements `mct-scroll-x` and `mct-scroll-y` directives. Listens
|
||||
* for scroll events and publishes their results into scope; watches
|
||||
* scope and updates scroll state to match. This varies for x- and y-
|
||||
* directives only by the attribute name chosen to find the expression,
|
||||
* and the property (scrollLeft or scrollTop) managed within the
|
||||
* element.
|
||||
*
|
||||
* This is exposed as two directives in `bundle.json`; the difference
|
||||
* is handled purely by parameterization.
|
||||
*
|
||||
* @constructor
|
||||
* @param $parse Angular's $parse
|
||||
* @param {string} property property to manage within the HTML element
|
||||
|
Loading…
x
Reference in New Issue
Block a user