mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 04:46:57 -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;
|
||||
};
|
||||
|
||||
ClayEvents.call(this, $rootContainer);
|
||||
// attach event methods
|
||||
ClayEvents.call(self, $rootContainer);
|
||||
|
||||
/**
|
||||
* Add item(s) to the config
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
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) {
|
||||
var self = this;
|
||||
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 {object} eventObj - an object to pass to the event handler, provided the
|
||||
* handler does not have custom arguments.
|
||||
* @param {object} [eventObj] - an object to pass to the event handler,
|
||||
* provided the handler does not have custom arguments.
|
||||
* @see {@link http://minifiedjs.com/api/trigger.html|.trigger()}
|
||||
* @returns {object}
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,8 @@ function ClayItem(config) {
|
||||
return self;
|
||||
};
|
||||
|
||||
ClayEvents.call(this, self.$manipulatorTarget);
|
||||
// attach event methods
|
||||
ClayEvents.call(self, self.$manipulatorTarget);
|
||||
|
||||
// attach the manipulator methods to the clayItem
|
||||
_.eachObj(_itemType.manipulator, function(methodName, method) {
|
||||
|
||||
Reference in New Issue
Block a user