diff --git a/src/core/PaperScope.js b/src/core/PaperScope.js index df7a6683..9c9b173e 100644 --- a/src/core/PaperScope.js +++ b/src/core/PaperScope.js @@ -116,11 +116,9 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{ /** * Gives access to paper's configurable settings. * - * settings.applyMatrix: - * - * settings.handleSize: - * - * settings.hitTolerance: + * {@option settings.applyMatrix:Boolean} + * {@option settings.handleSize:Number} + * {@option settings.hitTolerance:Number} * * @name PaperScope#settings * @type Object diff --git a/src/item/Item.js b/src/item/Item.js index 0dffbb22..e0d5395d 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -1670,31 +1670,31 @@ var Item = Base.extend(Emitter, /** @lends Item# */{ * * The options object allows you to control the specifics of the hit test * and may contain a combination of the following values: - * options.tolerance: {@code Number} – the tolerance of the hit test - * in points. Can also be controlled through - * {@link Project#options}{@code .hitTolerance}. - * options.class: Only hit test again a certain item class and its - * sub-classes: {@code Group, Layer, Path, CompoundPath, Shape, Raster, - * PlacedSymbol, PointText}, etc. - * options.fill: {@code Boolean} – hit test the fill of items. - * options.stroke: {@code Boolean} – hit test the stroke of path - * items, taking into account the setting of stroke color and width. - * options.segments: {@code Boolean} – hit test for - * {@link Segment#point} of {@link Path} items. - * options.curves: {@code Boolean} – hit test the curves of path - * items, without taking the stroke color or width into account. - * options.handles: {@code Boolean} – hit test for the handles - * ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments. - * options.ends: {@code Boolean} – only hit test for the first or - * last segment points of open path items. - * options.bounds: {@code Boolean} – hit test the corners and - * side-centers of the bounding rectangle of items ({@link Item#bounds}). - * options.center: {@code Boolean} – hit test the - * {@link Rectangle#center} of the bounding rectangle of items - * ({@link Item#bounds}). - * options.guides: {@code Boolean} – hit test items that have - * {@link Item#guide} set to {@code true}. - * options.selected: {@code Boolean} – only hit selected items.options.asString: {@code Boolean} – whether the JSON is returned - * as a {@code Object} or a {@code String}. - * options.precision: {@code Number} – the amount of fractional - * digits in numbers used in JSON data. + * {@option options.asString:{Boolean} whether the JSON is returned + * as a {@code Object} or a {@code String}.} + * {@option options.precision:{Number} the amount of fractional + * digits in numbers used in JSON data.} * * @name Item#exportJSON * @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. * * The options object offers control over some aspects of the SVG export: - * options.asString: {@code Boolean} – whether a SVG node or a - * {@code String} is to be returned. - * options.precision: {@code Number} – the amount of fractional - * digits in numbers used in SVG data. - * options.matchShapes: {@code Boolean} – whether imported path - * items should tried to be converted to shape items, if their geometries - * match. + * + * {@option options.asString:{Boolean} whether a SVG node or a + * {@code String} is to be returned.} + * {@option options.precision:{Number} the amount of fractional digits in + * numbers used in SVG data.} + * {@option options.matchShapes:{Boolean} whether path items should tried to + * be converted to shape items, if their geometries can be made to match.} * * @name Item#exportSVG * @function @@ -2011,8 +2011,9 @@ var Item = Base.extend(Emitter, /** @lends Item# */{ * {@link Item#removeChildren()} to do so. * * The options object offers control over some aspects of the SVG import: - * options.expandShapes: {@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 * @function @@ -3179,12 +3180,12 @@ var Item = Base.extend(Emitter, /** @lends Item# */{ * The function receives an event object which contains information about * the frame event: * - * {@code event.count}: the number of times the frame event was - * fired. - * {@code event.time}: the total amount of time passed since the - * first frame event in seconds. - * {@code event.delta}: the time passed in seconds since the last - * frame event. + * {@option event.count:{Number} the number of times the frame event was + * fired.} + * {@option event.time:{Number} the total amount of time passed since the + * first frame event in seconds.} + * {@option event.delta:{Number} the time passed in seconds since the last + * frame event.} * * @see View#onFrame * @example {@paperscript} diff --git a/src/project/Project.js b/src/project/Project.js index 0e8e3fcc..4c1beafb 100644 --- a/src/project/Project.js +++ b/src/project/Project.js @@ -292,33 +292,33 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * * The options object allows you to control the specifics of the hit test * and may contain a combination of the following values: - * options.tolerance: {@code Number} – the tolerance of the hit test - * in points, can also be controlled through - * {@link Project#options}{@code .hitTolerance}. - * options.class: Only hit test again a certain item class and its - * sub-classes: {@code Group, Layer, Path, CompoundPath, Shape, Raster, - * PlacedSymbol, PointText}, etc. - * options.fill: {@code Boolean} – hit test the fill of items. - * options.stroke: {@code Boolean} – hit test the stroke of path - * items, taking into account the setting of stroke color and width. - * options.segments: {@code Boolean} – hit test for - * {@link Segment#point} of {@link Path} items. - * options.curves: {@code Boolean} – hit test the curves of path - * items, without taking the stroke color or width into account. - * options.handles: {@code Boolean} – hit test for the handles - * ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments. - * options.ends: {@code Boolean} – only hit test for the first or - * last segment points of open path items. - * options.bounds: {@code Boolean} – hit test the corners and - * side-centers of the bounding rectangle of items ({@link Item#bounds}). - * options.center: {@code Boolean} – hit test the - * {@link Rectangle#center} of the bounding rectangle of items - * ({@link Item#bounds}). - * options.guides: {@code Boolean} – hit test items that have - * {@link Item#guide} set to {@code true}. - * options.selected: {@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, * tolerance: true }] * @return {HitResult} a hit result object that contains more @@ -773,10 +773,13 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * a JSON data string. * * The options object offers control over some aspects of the SVG export: - * options.asString: {@code Boolean} – whether the JSON is returned - * as a {@code Object} or a {@code String}. - * options.precision: {@code Number} – the amount of fractional - * digits in numbers used in JSON data. + * + * {@option options.asString:{Boolean} whether a SVG node or a {@code String} + * is to be returned.} + * {@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 * @function @@ -805,13 +808,13 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * all contained in one top level SVG group node. * * The options object offers control over some aspects of the SVG export: - * options.asString: {@code Boolean} – whether a SVG node or a - * {@code String} is to be returned. - * options.precision: {@code Number} – the amount of fractional - * digits in numbers used in SVG data. - * options.matchShapes: {@code Boolean} – whether imported path - * items should tried to be converted to shape items, if their geometries - * match. + * + * {@option options.asString:{Boolean} whether a SVG node or a + * {@code String} is to be returned.} + * {@option options.precision:{Number} the amount of fractional digits in + * numbers used in SVG data.} + * {@option options.matchShapes:{Boolean} whether path items should tried to + * be converted to shape items, if their geometries can be made to match.} * * @name Project#exportSVG * @function @@ -828,8 +831,9 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * {@link Project#clear()} to do so. * * The options object offers control over some aspects of the SVG import: - * options.expandShapes: {@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 * @function