add JSdoc to clarify ClayItem and ClayConfig props

This commit is contained in:
Keegan
2016-01-28 15:09:11 -08:00
parent f5e2dbe5a3
commit 9da9edbb78
3 changed files with 14 additions and 5 deletions
+2 -1
View File
@@ -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
+10 -3
View File
@@ -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}
*/
+2 -1
View File
@@ -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) {