From dc732da8d8004ed433076df877401411fbe55573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 30 Oct 2013 15:38:08 +0100 Subject: [PATCH] Clean up documentation for event handler functions on View and Tool. --- src/basic/Rectangle.js | 4 ++-- src/tool/Tool.js | 11 ++++++++--- src/ui/View.js | 11 ++++++++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/basic/Rectangle.js b/src/basic/Rectangle.js index 00efdaa5..43f27bb6 100644 --- a/src/basic/Rectangle.js +++ b/src/basic/Rectangle.js @@ -742,7 +742,7 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{ * {@code hor} amount and in vertical direction by the specified {@code ver} * amount. * - * @name Rectangle#expand^2 + * @name Rectangle#expand * @function * @param {Number} hor * @param {Number} ver @@ -766,7 +766,7 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{ * {@code hor} amount and in vertical direction by the specified {@code ver} * amount from its center. * - * @name Rectangle#scale^2 + * @name Rectangle#scale * @function * @param {Number} hor * @param {Number} ver diff --git a/src/tool/Tool.js b/src/tool/Tool.js index 74c2d3fc..1ad7f1cf 100644 --- a/src/tool/Tool.js +++ b/src/tool/Tool.js @@ -409,7 +409,8 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{ * * Attach an event handler to the tool. * - * @name Tool#on + * @name Tool#attach + * @alias Tool#on * @function * @param {String('mousedown', 'mouseup', 'mousedrag', 'mousemove', * 'keydown', 'keyup')} type the event type @@ -419,7 +420,8 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{ /** * Attach one or more event handlers to the tool. * - * @name Tool#on^2 + * @name Tool#attach + * @alias Tool#on * @function * @param {Object} param an object literal containing one or more of the * following properties: {@code mousedown, mouseup, mousedrag, mousemove, @@ -430,6 +432,7 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{ * Detach an event handler from the tool. * * @name Tool#detach + * @alias Tool#off * @function * @param {String('mousedown', 'mouseup', 'mousedrag', 'mousemove', * 'keydown', 'keyup')} type the event type @@ -438,7 +441,8 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{ /** * Detach one or more event handlers from the tool. * - * @name Tool#detach^2 + * @name Tool#detach + * @alias Tool#off * @function * @param {Object} param an object literal containing one or more of the * following properties: {@code mousedown, mouseup, mousedrag, mousemove, @@ -449,6 +453,7 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{ * Fire an event on the tool. * * @name Tool#fire + * @alias Tool#trigger * @function * @param {String('mousedown', 'mouseup', 'mousedrag', 'mousemove', * 'keydown', 'keyup')} type the event type diff --git a/src/ui/View.js b/src/ui/View.js index b2cd21a6..d835ee65 100644 --- a/src/ui/View.js +++ b/src/ui/View.js @@ -460,7 +460,8 @@ var View = Base.extend(Callback, /** @lends View# */{ * * Attach an event handler to the view. * - * @name View#on + * @name View#attach + * @alias View#on * @function * @param {String('frame', 'resize')} type the event type * @param {Function} function The function to be called when the event @@ -482,7 +483,8 @@ var View = Base.extend(Callback, /** @lends View# */{ /** * Attach one or more event handlers to the view. * - * @name View#on^2 + * @name View#attach + * @alias View#on * @function * @param {Object} param an object literal containing one or more of the * following properties: {@code frame, resize}. @@ -505,6 +507,7 @@ var View = Base.extend(Callback, /** @lends View# */{ * Detach an event handler from the view. * * @name View#detach + * @alias View#off * @function * @param {String('frame', 'resize')} type the event type * @param {Function} function The function to be detached @@ -533,7 +536,8 @@ var View = Base.extend(Callback, /** @lends View# */{ /** * Detach one or more event handlers from the view. * - * @name View#detach^2 + * @name View#detach + * @alias View#off * @function * @param {Object} param an object literal containing one or more of the * following properties: {@code frame, resize} @@ -543,6 +547,7 @@ var View = Base.extend(Callback, /** @lends View# */{ * Fire an event on the view. * * @name View#fire + * @alias View#trigger * @function * @param {String('frame', 'resize')} type the event type * @param {Object} event an object literal containing properties describing