mirror of
https://github.com/pebble-dev/clay.git
synced 2026-09-05 08:37:43 -04:00
add JSdoc to clarify ClayItem and ClayConfig props
This commit is contained in:
@@ -70,7 +70,8 @@ function ClayConfig(settings, config, $rootContainer) {
|
|||||||
return _settings;
|
return _settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
ClayEvents.call(this, $rootContainer);
|
// attach event methods
|
||||||
|
ClayEvents.call(self, $rootContainer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add item(s) to the config
|
* Add item(s) to the config
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
var $ = require('../vendor/minified/minified').$;
|
var $ = require('../vendor/minified/minified').$;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attaches event methods to the context.
|
||||||
|
* Call with ClayEvents.call(yourObject, $eventTarget)
|
||||||
|
* @param {EventEmitter} $eventTarget - An object that will be used as the event
|
||||||
|
* target. Must implement EventEmitter
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
function ClayEvents($eventTarget) {
|
function ClayEvents($eventTarget) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var _eventProxies = {};
|
var _eventProxies = {};
|
||||||
@@ -55,10 +62,10 @@ function ClayEvents($eventTarget) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* trigger an event. This proxies minified.js' trigger.
|
* Trigger an event. This proxies minified.js' trigger.
|
||||||
* @param {string} name - a single event name to trigger
|
* @param {string} name - a single event name to trigger
|
||||||
* @param {object} eventObj - an object to pass to the event handler, provided the
|
* @param {object} [eventObj] - an object to pass to the event handler,
|
||||||
* handler does not have custom arguments.
|
* provided the handler does not have custom arguments.
|
||||||
* @see {@link http://minifiedjs.com/api/trigger.html|.trigger()}
|
* @see {@link http://minifiedjs.com/api/trigger.html|.trigger()}
|
||||||
* @returns {object}
|
* @returns {object}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ function ClayItem(config) {
|
|||||||
return self;
|
return self;
|
||||||
};
|
};
|
||||||
|
|
||||||
ClayEvents.call(this, self.$manipulatorTarget);
|
// attach event methods
|
||||||
|
ClayEvents.call(self, self.$manipulatorTarget);
|
||||||
|
|
||||||
// attach the manipulator methods to the clayItem
|
// attach the manipulator methods to the clayItem
|
||||||
_.eachObj(_itemType.manipulator, function(methodName, method) {
|
_.eachObj(_itemType.manipulator, function(methodName, method) {
|
||||||
|
|||||||
Reference in New Issue
Block a user