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. * All rights reserved.
*/ */
/**
* @name Component
* @class
*/
var Component = this.Component = Base.extend(Callback, /** @lends Component# */{ var Component = this.Component = Base.extend(Callback, /** @lends Component# */{
_events: [ 'onChange', 'onClick' ], _events: [ 'onChange', 'onClick' ],

View file

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

View file

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

View file

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

View file

@ -17,7 +17,7 @@
/** /**
* @name View * @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 * interaction through mouse and keyboard for it. It offer means to scroll the
* view, find the currently visible bounds in project coordinates, or the * view, find the currently visible bounds in project coordinates, or the
* center, both useful for constructing artwork that should appear centered on * center, both useful for constructing artwork that should appear centered on