mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Some documentation fixes for v0.2
This commit is contained in:
parent
4fa6ffeb01
commit
022de4d781
4 changed files with 31 additions and 30 deletions
|
@ -126,7 +126,8 @@ var PaperScope = this.PaperScope = Base.extend(/** @lends PaperScope# */{
|
|||
* paper.install(window);
|
||||
*/
|
||||
install: function(scope) {
|
||||
// Define project, view and tool as getters, so they are kept up to date
|
||||
// Define project, view and tool as getters that redirect to these
|
||||
// values on the PaperScope, so they are kept up to date
|
||||
var that = this;
|
||||
Base.each(['project', 'view', 'tool'], function(key) {
|
||||
Base.define(scope, key, {
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
* @class A HitResult object contains information about the results of a hit
|
||||
* test. It is returned by {@link Item#hitTest(point)} and
|
||||
* {@link Project#hitTest(point)}.
|
||||
*
|
||||
* @extends CurveLocation
|
||||
*/
|
||||
HitResult = Base.extend(/** @lends HitResult# */{
|
||||
initialize: function(type, item, values) {
|
||||
|
|
|
@ -695,18 +695,19 @@ var Item = this.Item = Base.extend(/** @lends Item# */{
|
|||
* <b>options.type:</b> Only hit test again a certain item
|
||||
* type: {@link PathItem}, {@link Raster}, {@link TextItem}, etc.
|
||||
* <b>options.fill:</b> {@code Boolean} - Hit test the fill of items.
|
||||
* <b>options.stroke:</b> {@code Boolean} - Hit test the curves of path items,
|
||||
* taking into account stroke width.
|
||||
* <b>options.segment:</b> {@code Boolean} - Hit test for {@link Segment#point} of
|
||||
* {@link Path} items.
|
||||
* <b>options.stroke:</b> {@code Boolean} - Hit test the curves of path
|
||||
* items, taking into account stroke width.
|
||||
* <b>options.segment:</b> {@code Boolean} - Hit test for
|
||||
* {@link Segment#point} of {@link Path} items.
|
||||
* <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.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.guide:</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.
|
||||
|
|
|
@ -187,26 +187,27 @@ var Project = this.Project = Base.extend(/** @lends Project# */{
|
|||
*
|
||||
* The optional options object allows you to control the specifics of the
|
||||
* hit test and may contain a combination of the following values:
|
||||
* <b>tolerance:</b> {@code Number} - The tolerance of the hit test in
|
||||
* points.
|
||||
* <b>type:</b> Only hit test again a certain item
|
||||
* <b>options.tolerance:</b> {@code Number} - The tolerance of the hit test
|
||||
* in points.
|
||||
* <b>options.type:</b> Only hit test again a certain item
|
||||
* type: {@link PathItem}, {@link Raster}, {@link TextItem}, etc.
|
||||
* <b>fill:</b> {@code Boolean} - Hit test the fill of items.
|
||||
* <b>stroke:</b> {@code Boolean} - Hit test the curves of path items,
|
||||
* taking into account stroke width.
|
||||
* <b>segment:</b> {@code Boolean} - Hit test for {@link Segment#point} of
|
||||
* {@link Path} items.
|
||||
* <b>handles:</b> {@code Boolean} - Hit test for the handles
|
||||
* <b>options.fill:</b> {@code Boolean} - Hit test the fill of items.
|
||||
* <b>options.stroke:</b> {@code Boolean} - Hit test the curves of path
|
||||
* items, taking into account stroke width.
|
||||
* <b>options.segment:</b> {@code Boolean} - Hit test for
|
||||
* {@link Segment#point} of {@link Path} items.
|
||||
* <b>options.handles:</b> {@code Boolean} - Hit test for the handles
|
||||
* ({@link Segment#handleIn} / {@link Segment#handleOut}) of path segments.
|
||||
* <b>ends:</b> {@code Boolean} - Only hit test for the first or last
|
||||
* segment points of open path items.
|
||||
* <b>bounds:</b> {@code Boolean} - Hit test the corners and side-centers
|
||||
* of the bounding rectangle of items ({@link Item#bounds}).
|
||||
* <b>center:</b> {@code Boolean} - Hit test the {@link Rectangle#center}
|
||||
* of the bounding rectangle of items ({@link Item#bounds}).
|
||||
* <b>guide:</b> {@code Boolean} - Hit test items that have
|
||||
* <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.guide:</b> {@code Boolean} - Hit test items that have
|
||||
* {@link Item#guide} set to {@code true}.
|
||||
* <b>selected:</b> {@code Boolean} - Only hit selected items.
|
||||
* <b>options.selected:</b> {@code 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,
|
||||
|
|
Loading…
Reference in a new issue