From a39eea64e9798dd6523a89485b7bbfac4e2bb0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 20 Oct 2014 23:55:24 +0200 Subject: [PATCH] Improve docs sequence a bit. --- src/core/PaperScope.js | 6 +++--- src/item/Item.js | 15 ++++++--------- src/project/Project.js | 15 ++++++--------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/core/PaperScope.js b/src/core/PaperScope.js index 83e5d31a..1304dcd8 100644 --- a/src/core/PaperScope.js +++ b/src/core/PaperScope.js @@ -116,12 +116,12 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{ /** * Gives access to paper's configurable settings. * + * @name PaperScope#settings + * @type Object + * * @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 d56e0d5e..fe42264a 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -2014,15 +2014,14 @@ var Item = Base.extend(Emitter, /** @lends Item# */{ * Exports (serializes) the item with its content and child items to a JSON * data string. * - * The options object offers control over some aspects of the JSON export: + * @name Item#exportJSON + * @function * * @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 * @param {Object} [options={ asString: true, precision: 5 }] the * serialization options * @return {String} the exported JSON data @@ -2050,7 +2049,8 @@ 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: + * @name Item#exportSVG + * @function * * @option options.asString {Boolean} whether a SVG node or a {@code String} * is to be returned. @@ -2059,8 +2059,6 @@ var Item = Base.extend(Emitter, /** @lends Item# */{ * @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 * @param {Object} [options={ asString: false, precision: 5, * matchShapes: false }] the export options. * @return {SVGElement} the item converted to an SVG node @@ -2073,13 +2071,12 @@ var Item = Base.extend(Emitter, /** @lends Item# */{ * Note that the item is not cleared first. You can call * {@link Item#removeChildren()} to do so. * - * The options object offers control over some aspects of the SVG import: + * @name Item#importSVG + * @function * * @option options.expandShapes {Boolean} whether imported shape items * should be expanded to path items. * - * @name Item#importSVG - * @function * @param {SVGElement|String} svg the SVG content to import * @param {Object} [options={ expandShapes: false }] the import options * @return {Item} the imported Paper.js parent item diff --git a/src/project/Project.js b/src/project/Project.js index ce51c76e..9a9b93bd 100644 --- a/src/project/Project.js +++ b/src/project/Project.js @@ -593,15 +593,14 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * Exports (serializes) the project with all its layers and child items to * a JSON data string. * - * The options object offers control over some aspects of the JSON export: + * @name Project#exportJSON + * @function * * @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 Project#exportJSON - * @function * @param {Object} [options={ asString: true, precision: 5 }] the * serialization options * @return {String} the exported JSON data @@ -626,7 +625,8 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * Exports the project with all its layers and child items as an SVG DOM, * all contained in one top level SVG group node. * - * The options object offers control over some aspects of the SVG export: + * @name Project#exportSVG + * @function * * @option options.asString {Boolean} whether a SVG node or a {@code String} * is to be returned. @@ -635,8 +635,6 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * @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 * @param {Object} [options={ asString: false, precision: 5, * matchShapes: false }] the export options. * @return {SVGElement} the project converted to an SVG node @@ -649,13 +647,12 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * Note that the project is not cleared first. You can call * {@link Project#clear()} to do so. * - * The options object offers control over some aspects of the SVG import: + * @name Project#importSVG + * @function * * @option options.expandShapes {Boolean} whether imported shape items * should be expanded to path items. * - * @name Project#importSVG - * @function * @param {SVGElement|String} svg the SVG content to import * @param {Object} [options={ expandShapes: false }] the import options * @return {Item} the imported Paper.js parent item