Improve documentation.

This commit is contained in:
Jürg Lehni 2012-12-23 16:01:53 +01:00
parent 734cc1cc61
commit 1046e440e8
5 changed files with 19 additions and 7 deletions

View file

@ -14,6 +14,10 @@
* All rights reserved.
*/
/**
* @name Component
* @class
*/
var Component = this.Component = Base.extend(Callback, /** @lends Component# */{
_events: [ 'onChange', 'onClick' ],

View file

@ -17,10 +17,10 @@
/**
* @name KeyEvent
*
* @class KeyEvent The KeyEvent object is received by the {@link Tool}'s
* keyboard handlers {@link Tool#onKeyDown}, {@link Tool#onKeyUp},
* The KeyEvent object is the only parameter passed to these functions
* and contains information about the keyboard event.
* @class The KeyEvent object is received by the {@link Tool}'s keyboard
* handlers {@link Tool#onKeyDown}, {@link Tool#onKeyUp}. The KeyEvent object is
* the only parameter passed to these functions and contains information about
* the keyboard event.
*
* @extends Event
*/

View file

@ -17,8 +17,8 @@
/**
* @name MouseEvent
*
* @class MouseEvent The MouseEvent object is received by the {@link Item}'s
* mouse event handlers {@link Item#onMouseDown}, {@link Item#onMouseDrag},
* @class The MouseEvent object is received by the {@link Item}'s mouse event
* handlers {@link Item#onMouseDown}, {@link Item#onMouseDrag},
* {@link Item#onMouseMove}, {@link Item#onMouseUp}, {@link Item#onClick},
* {@link Item#onDoubleClick}, {@link Item#onMouseEnter} and
* {@link Item#onMouseLeave}. The MouseEvent object is the only parameter passed

View file

@ -14,6 +14,10 @@
* All rights reserved.
*/
/**
* @name Palette
* @class
*/
var Palette = this.Palette = Base.extend(Callback, /** @lends Palette# */{
_events: [ 'onChange' ],
@ -63,6 +67,10 @@ var Palette = this.Palette = Base.extend(Callback, /** @lends Palette# */{
paper.palettes.push(this);
},
/**
* Resets the values of the components to their
* {@link Component#defaultValue}.
*/
reset: function() {
for (var i in this._components)
this._components[i].reset();

View file

@ -17,7 +17,7 @@
/**
* @name View
*
* @class The View object wraps an html element and handles drawing and user
* @class The View object wraps an HTML element and handles drawing and user
* interaction through mouse and keyboard for it. It offer means to scroll the
* view, find the currently visible bounds in project coordinates, or the
* center, both useful for constructing artwork that should appear centered on