mirror of
https://github.com/nasa/openmct.git
synced 2025-05-28 21:24:20 +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",
|
"key": "mctResize",
|
||||||
"implementation": "directives/MCTResize.js",
|
"implementation": "directives/MCTResize.js",
|
||||||
"depends": [ "$timeout" ]
|
"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": [
|
"containers": [
|
||||||
|
@ -6,12 +6,16 @@ define(
|
|||||||
'use strict';
|
'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
|
* for scroll events and publishes their results into scope; watches
|
||||||
* scope and updates scroll state to match. This varies for x- and y-
|
* scope and updates scroll state to match. This varies for x- and y-
|
||||||
* directives only by the attribute name chosen to find the expression,
|
* directives only by the attribute name chosen to find the expression,
|
||||||
* and the property (scrollLeft or scrollTop) managed within the
|
* and the property (scrollLeft or scrollTop) managed within the
|
||||||
* element.
|
* element.
|
||||||
|
*
|
||||||
|
* This is exposed as two directives in `bundle.json`; the difference
|
||||||
|
* is handled purely by parameterization.
|
||||||
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param $parse Angular's $parse
|
* @param $parse Angular's $parse
|
||||||
* @param {string} property property to manage within the HTML element
|
* @param {string} property property to manage within the HTML element
|
||||||
|
Loading…
x
Reference in New Issue
Block a user