diff --git a/src/MCT.js b/src/MCT.js index d5ecf54ed5..6788e937fc 100644 --- a/src/MCT.js +++ b/src/MCT.js @@ -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)); diff --git a/src/api/ui/GestureAPI.js b/src/api/ui/GestureAPI.js new file mode 100644 index 0000000000..76f91f2425 --- /dev/null +++ b/src/api/ui/GestureAPI.js @@ -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; +});