Skip to content

Commit

Permalink
Use @member instead of @type for properties; improve handling of opti…
Browse files Browse the repository at this point in the history
…onal method parameters; solution for doc of pseudo-properties
  • Loading branch information
Adrian Vasiliu committed Mar 12, 2014
1 parent 5659cc8 commit f0cc903
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
5 changes: 3 additions & 2 deletions Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ define([
* Inserts specified child widget or DOM node as a child of this widget's
* container node, and possibly does other processing (such as layout).
* @param {DOMNode} widget
* @param {int?} insertIndex
* @param {int} [insertIndex]
*/
addChild: function (/*DOMNode*/ widget, /*int?*/ insertIndex) {
addChild: function (widget, insertIndex) {
// addChild: function (/*DOMNode*/ widget, /*int?*/ insertIndex) {
// summary:
// Makes the given widget or DOM node a child of this widget.
// description:
Expand Down
2 changes: 1 addition & 1 deletion CustomElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ define([

/**
* Search subtree under root returning custom elements found.
* @param {Element?} root Node to search under.
* @param [Element] root Node to search under.
*/
findCustomElements: function (root) {
// summary:
Expand Down
4 changes: 2 additions & 2 deletions Invalidating.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ define(["dcl/dcl", "dojo/_base/lang", "./Stateful"], function (dcl, lang, Statef
/**
* Whether at least one property is invalid. This is readonly information, one must call
* invalidateProperties() to modify this flag.
* @type {boolean}
* @member {boolean}
* @default false
*/
invalidProperties: false,
Expand All @@ -50,7 +50,7 @@ define(["dcl/dcl", "dojo/_base/lang", "./Stateful"], function (dcl, lang, Statef
/**
* Whether the rendering is invalid. This is readonly information, one must call
* invalidateRendering() to modify this flag.
* @type {boolean}
* @member {boolean}
* @default false
*/
invalidRendering: false,
Expand Down
4 changes: 2 additions & 2 deletions Scrollable.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ define([
* Note that scrolling programmatically using scrollTo() is
* possible on both horizontal and vertical directions independently
* on the value of scrollDirection.
* @type {string}
* @member {string}
* @default "vertical"
*/
scrollDirection: "vertical",
Expand All @@ -91,7 +91,7 @@ define([
* itself ('this').
* Note that this property can be set only at construction time, at latest
* in the buildRendering() method of the widget into which this class is mixed.
* @type {DomNode}
* @member {DomNode}
* @default null
*/
scrollableNode: null,
Expand Down
18 changes: 15 additions & 3 deletions Widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,23 @@ define([
/**
* This widget or a widget it contains has focus, or is "active" because
* it was recently clicked.
* @type {boolean}
* @member {boolean}
* @default false
*/
focused: false,

/**
* Designates where children of the source DOM node will be placed.
* "Children" in this case refers to both DOM nodes and widgets.
* <p>
* containerNode must be defined for any widget that accepts innerHTML
* (like ContentPane or BorderContainer or even Button), and conversely
* is undefined for widgets that don't, like TextBox.
* </p>
* @member {DomNode} module:delite/Widget#containerNode
* @default undefined
*/

/*=====
// containerNode: [readonly] DomNode
// Designates where children of the source DOM node will be placed.
Expand All @@ -77,7 +89,7 @@ define([
/**
* Convenience pointer to register class. Used by buildRendering() functions produced from
* handlebars! / template.
* @type {delite/register}
* @member {delite/register}
*/
register: register,

Expand Down Expand Up @@ -333,7 +345,7 @@ define([
* shorthand mechanism to put an existing (or newly created) Widget
* somewhere in the dom, and allow chaining.
* @param {String|DomNode|Widget} reference Widget, DOMNode, or id of widget or DOMNode
* @param {String|Int?} position If reference is a widget (or id of widget), and that widget has an ".addChild" method,
* @param [String|Int] position If reference is a widget (or id of widget), and that widget has an ".addChild" method,
* it will be called passing this widget instance into that method, supplying the optional
* position index passed. In this case position (if specified) should be an integer.
* <p>
Expand Down

0 comments on commit f0cc903

Please sign in to comment.