[API] Gestures

This commit is contained in:
Victor Woeltjen 2016-09-07 09:28:26 -07:00
parent 649567176d
commit 60800c913e
2 changed files with 35 additions and 0 deletions

View File

@ -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
View 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;
});