Update docs to use the newly introduced {@option} tag to docuemnt option-style objects.

This commit is contained in:
Jürg Lehni 2014-10-20 22:41:45 +02:00
parent 8f201205aa
commit 82b988327d
3 changed files with 91 additions and 88 deletions

View file

@ -116,11 +116,9 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
/** /**
* Gives access to paper's configurable settings. * Gives access to paper's configurable settings.
* *
* <b>settings.applyMatrix:</b> * {@option settings.applyMatrix:Boolean}
* * {@option settings.handleSize:Number}
* <b>settings.handleSize:</b> * {@option settings.hitTolerance:Number}
*
* <b>settings.hitTolerance:</b>
* *
* @name PaperScope#settings * @name PaperScope#settings
* @type Object * @type Object

View file

@ -1670,31 +1670,31 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
* *
* The options object allows you to control the specifics of the hit test * The options object allows you to control the specifics of the hit test
* and may contain a combination of the following values: * and may contain a combination of the following values:
* <b>options.tolerance:</b> {@code Number} the tolerance of the hit test *
* in points. Can also be controlled through * {@option options.tolerance:Number the tolerance of the hit test in
* {@link Project#options}{@code .hitTolerance}. * points. Can also be controlled through
* <b>options.class:</b> Only hit test again a certain item class and its * {@link Project#options}{@code .hitTolerance}.}
* sub-classes: {@code Group, Layer, Path, CompoundPath, Shape, Raster, * {@option options.class:{Function} Only hit test again a certain item
* PlacedSymbol, PointText}, etc. * class and its sub-classes: {@code Group, Layer, Path, CompoundPath,
* <b>options.fill:</b> {@code Boolean} hit test the fill of items. * Shape, Raster, PlacedSymbol, PointText}, etc.}
* <b>options.stroke:</b> {@code Boolean} hit test the stroke of path * {@option options.fill:{Boolean} hit test the fill of items.}
* items, taking into account the setting of stroke color and width. * {@option options.stroke:{Boolean} hit test the stroke of path.}
* <b>options.segments:</b> {@code Boolean} hit test for * items, taking into account the setting of stroke color and width.}
* {@link Segment#point} of {@link Path} items. * {@option options.segments:{Boolean} hit test for {@link Segment#point} of
* <b>options.curves:</b> {@code Boolean} hit test the curves of path * {@link Path} items.}
* items, without taking the stroke color or width into account. * {@option options.curves:{Boolean} hit test the curves of path items,
* <b>options.handles:</b> {@code Boolean} hit test for the handles * without taking the stroke color or width into account.}
* ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments. * {@option options.handles:{Boolean} hit test for the handles.}
* <b>options.ends:</b> {@code Boolean} only hit test for the first or * ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments.}
* last segment points of open path items. * {@option options.ends:{Boolean} only hit test for the first or
* <b>options.bounds:</b> {@code Boolean} hit test the corners and * last segment points of open path items.}
* side-centers of the bounding rectangle of items ({@link Item#bounds}). * {@option options.bounds:{Boolean} hit test the corners and
* <b>options.center:</b> {@code Boolean} hit test the * side-centers of the bounding rectangle of items ({@link Item#bounds}).}
* {@link Rectangle#center} of the bounding rectangle of items * {@option options.center:{Boolean} hit test the {@link Rectangle#center}
* ({@link Item#bounds}). * of the bounding rectangle of items ({@link Item#bounds}).}
* <b>options.guides:</b> {@code Boolean} hit test items that have * {@option options.guides:{Boolean} hit test items that have
* {@link Item#guide} set to {@code true}. * {@link Item#guide} set to {@code true}.}
* <b>options.selected:</b> {@code Boolean} only hit selected items.<b * {@option options.selected:{Boolean} only hit selected items.}
* *
* @param {Point} point The point where the hit test should be performed * @param {Point} point The point where the hit test should be performed
* @param {Object} [options={ fill: true, stroke: true, segments: true, * @param {Object} [options={ fill: true, stroke: true, segments: true,
@ -1953,10 +1953,10 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
* data string. * data string.
* *
* The options object offers control over some aspects of the SVG export: * The options object offers control over some aspects of the SVG export:
* <b>options.asString:</b> {@code Boolean} whether the JSON is returned * {@option options.asString:{Boolean} whether the JSON is returned
* as a {@code Object} or a {@code String}. * as a {@code Object} or a {@code String}.}
* <b>options.precision:</b> {@code Number} the amount of fractional * {@option options.precision:{Number} the amount of fractional
* digits in numbers used in JSON data. * digits in numbers used in JSON data.}
* *
* @name Item#exportJSON * @name Item#exportJSON
* @function * @function
@ -1988,13 +1988,13 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
* Exports the item with its content and child items as an SVG DOM. * Exports the item with its content and child items as an SVG DOM.
* *
* The options object offers control over some aspects of the SVG export: * The options object offers control over some aspects of the SVG export:
* <b>options.asString:</b> {@code Boolean} whether a SVG node or a *
* {@code String} is to be returned. * {@option options.asString:{Boolean} whether a SVG node or a
* <b>options.precision:</b> {@code Number} the amount of fractional * {@code String} is to be returned.}
* digits in numbers used in SVG data. * {@option options.precision:{Number} the amount of fractional digits in
* <b>options.matchShapes:</b> {@code Boolean} whether imported path * numbers used in SVG data.}
* items should tried to be converted to shape items, if their geometries * {@option options.matchShapes:{Boolean} whether path items should tried to
* match. * be converted to shape items, if their geometries can be made to match.}
* *
* @name Item#exportSVG * @name Item#exportSVG
* @function * @function
@ -2011,8 +2011,9 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
* {@link Item#removeChildren()} to do so. * {@link Item#removeChildren()} to do so.
* *
* The options object offers control over some aspects of the SVG import: * The options object offers control over some aspects of the SVG import:
* <b>options.expandShapes:</b> {@code Boolean} whether imported shape *
* items should be expanded to path items. * {@option options.expandShapes:{Boolean} whether imported shape
* items should be expanded to path items.}
* *
* @name Item#importSVG * @name Item#importSVG
* @function * @function
@ -3179,12 +3180,12 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
* The function receives an event object which contains information about * The function receives an event object which contains information about
* the frame event: * the frame event:
* *
* <b>{@code event.count}</b>: the number of times the frame event was * {@option event.count:{Number} the number of times the frame event was
* fired. * fired.}
* <b>{@code event.time}</b>: the total amount of time passed since the * {@option event.time:{Number} the total amount of time passed since the
* first frame event in seconds. * first frame event in seconds.}
* <b>{@code event.delta}</b>: the time passed in seconds since the last * {@option event.delta:{Number} the time passed in seconds since the last
* frame event. * frame event.}
* *
* @see View#onFrame * @see View#onFrame
* @example {@paperscript} * @example {@paperscript}

View file

@ -292,33 +292,33 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
* *
* The options object allows you to control the specifics of the hit test * The options object allows you to control the specifics of the hit test
* and may contain a combination of the following values: * and may contain a combination of the following values:
* <b>options.tolerance:</b> {@code Number} the tolerance of the hit test
* in points, can also be controlled through
* {@link Project#options}{@code .hitTolerance}.
* <b>options.class:</b> Only hit test again a certain item class and its
* sub-classes: {@code Group, Layer, Path, CompoundPath, Shape, Raster,
* PlacedSymbol, PointText}, etc.
* <b>options.fill:</b> {@code Boolean} hit test the fill of items.
* <b>options.stroke:</b> {@code Boolean} hit test the stroke of path
* items, taking into account the setting of stroke color and width.
* <b>options.segments:</b> {@code Boolean} hit test for
* {@link Segment#point} of {@link Path} items.
* <b>options.curves:</b> {@code Boolean} hit test the curves of path
* items, without taking the stroke color or width into account.
* <b>options.handles:</b> {@code Boolean} hit test for the handles
* ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments.
* <b>options.ends:</b> {@code Boolean} only hit test for the first or
* last segment points of open path items.
* <b>options.bounds:</b> {@code Boolean} hit test the corners and
* side-centers of the bounding rectangle of items ({@link Item#bounds}).
* <b>options.center:</b> {@code Boolean} hit test the
* {@link Rectangle#center} of the bounding rectangle of items
* ({@link Item#bounds}).
* <b>options.guides:</b> {@code Boolean} hit test items that have
* {@link Item#guide} set to {@code true}.
* <b>options.selected:</b> {@code Boolean} only hit selected items.
* *
* @param {Point} point The point where the hit test should be performed * {@option options.tolerance:Number the tolerance of the hit test in
* points. Can also be controlled through
* {@link Project#options}{@code .hitTolerance}.}
* {@option options.class:{Function} Only hit test again a certain item
* class and its sub-classes: {@code Group, Layer, Path, CompoundPath,
* Shape, Raster, PlacedSymbol, PointText}, etc.}
* {@option options.fill:{Boolean} hit test the fill of items.}
* {@option options.stroke:{Boolean} hit test the stroke of path.}
* items, taking into account the setting of stroke color and width.}
* {@option options.segments:{Boolean} hit test for {@link Segment#point} of
* {@link Path} items.}
* {@option options.curves:{Boolean} hit test the curves of path items,
* without taking the stroke color or width into account.}
* {@option options.handles:{Boolean} hit test for the handles.}
* ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments.}
* {@option options.ends:{Boolean} only hit test for the first or
* last segment points of open path items.}
* {@option options.bounds:{Boolean} hit test the corners and
* side-centers of the bounding rectangle of items ({@link Item#bounds}).}
* {@option options.center:{Boolean} hit test the {@link Rectangle#center}
* of the bounding rectangle of items ({@link Item#bounds}).}
* {@option options.guides:{Boolean} hit test items that have
* {@link Item#guide} set to {@code true}.}
* {@option options.selected:{Boolean} only hit selected items.}
*
* @param {Point} point the point where the hit test should be performed
* @param {Object} [options={ fill: true, stroke: true, segments: true, * @param {Object} [options={ fill: true, stroke: true, segments: true,
* tolerance: true }] * tolerance: true }]
* @return {HitResult} a hit result object that contains more * @return {HitResult} a hit result object that contains more
@ -773,10 +773,13 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
* a JSON data string. * a JSON data string.
* *
* The options object offers control over some aspects of the SVG export: * The options object offers control over some aspects of the SVG export:
* <b>options.asString:</b> {@code Boolean} whether the JSON is returned *
* as a {@code Object} or a {@code String}. * {@option options.asString:{Boolean} whether a SVG node or a {@code String}
* <b>options.precision:</b> {@code Number} the amount of fractional * is to be returned.}
* digits in numbers used in JSON data. * {@option options.precision:{Number} the amount of fractional digits in
* numbers used in SVG data.}
* {@option options.matchShapes:{Boolean} whether imported path items should
* tried to be converted to shape items, if their geometries match.}
* *
* @name Project#exportJSON * @name Project#exportJSON
* @function * @function
@ -805,13 +808,13 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
* all contained in one top level SVG group node. * all contained in one top level SVG group node.
* *
* The options object offers control over some aspects of the SVG export: * The options object offers control over some aspects of the SVG export:
* <b>options.asString:</b> {@code Boolean} whether a SVG node or a *
* {@code String} is to be returned. * {@option options.asString:{Boolean} whether a SVG node or a
* <b>options.precision:</b> {@code Number} the amount of fractional * {@code String} is to be returned.}
* digits in numbers used in SVG data. * {@option options.precision:{Number} the amount of fractional digits in
* <b>options.matchShapes:</b> {@code Boolean} whether imported path * numbers used in SVG data.}
* items should tried to be converted to shape items, if their geometries * {@option options.matchShapes:{Boolean} whether path items should tried to
* match. * be converted to shape items, if their geometries can be made to match.}
* *
* @name Project#exportSVG * @name Project#exportSVG
* @function * @function
@ -828,8 +831,9 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
* {@link Project#clear()} to do so. * {@link Project#clear()} to do so.
* *
* The options object offers control over some aspects of the SVG import: * The options object offers control over some aspects of the SVG import:
* <b>options.expandShapes:</b> {@code Boolean} whether imported shape *
* items should be expanded to path items. * {@option options.expandShapes:{Boolean} whether imported shape
* items should be expanded to path items.}
* *
* @name Project#importSVG * @name Project#importSVG
* @function * @function