mirror of
https://github.com/nasa/openmct.git
synced 2025-02-01 00:45:41 +00:00
[API] Gestures
This commit is contained in:
parent
649567176d
commit
60800c913e
@ -113,6 +113,13 @@ define([
|
||||
* @name types
|
||||
*/
|
||||
|
||||
/**
|
||||
* Utilities for attaching common behaviors to views.
|
||||
*
|
||||
* @type {module:openmct.GestureAPI}
|
||||
* @memberof module:openmct.MCT#
|
||||
* @name gestures
|
||||
*/
|
||||
|
||||
this.TimeConductor = this.conductor; // compatibility for prototype
|
||||
this.on('navigation', this.selection.clear.bind(this.selection));
|
||||
|
28
src/api/ui/GestureAPI.js
Normal file
28
src/api/ui/GestureAPI.js
Normal file
@ -0,0 +1,28 @@
|
||||
define([], function () {
|
||||
/**
|
||||
* Allows support for common user actions to be attached to views.
|
||||
* @interface GestureAPI
|
||||
* @memberof module:openmct
|
||||
*/
|
||||
function GestureAPI() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Designate an HTML element as selectable, and associated with a
|
||||
* particular object.
|
||||
*
|
||||
* @param {HTMLElement} htmlElement the element to make selectable
|
||||
* @param {*} item the object which should become selected when this
|
||||
* element is clicked.
|
||||
* @returns {Function} a function to remove selectability from this
|
||||
* HTML element.
|
||||
* @method selectable
|
||||
* @memberof module:openmct.GestureAPI#
|
||||
*/
|
||||
GestureAPI.prototype.selectable = function (htmlElement, item) {
|
||||
|
||||
};
|
||||
|
||||
return GestureAPI;
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user