mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Prebuilt module for commit e179b08156
This commit is contained in:
parent
ed3bd54881
commit
4e222a6dff
17 changed files with 204 additions and 151 deletions
13
dist/docs/assets/js/paper.js
vendored
13
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Tue Feb 9 15:09:39 2016 +0100
|
||||
* Date: Tue Feb 9 16:01:06 2016 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -3408,15 +3408,18 @@ new function() {
|
|||
return Base.equals(this._children, item._children);
|
||||
},
|
||||
|
||||
clone: function(insert) {
|
||||
clone: function(options) {
|
||||
var copy = new this.constructor(Item.NO_INSERT),
|
||||
children = this._children;
|
||||
children = this._children,
|
||||
insert = Base.pick(options && options.insert, true),
|
||||
deep = Base.pick(options && options.deep, true);
|
||||
if (children)
|
||||
copy.copyAttributes(this);
|
||||
copy.copyContent(this);
|
||||
if (!children || deep)
|
||||
copy.copyContent(this);
|
||||
if (!children)
|
||||
copy.copyAttributes(this);
|
||||
if (insert === undefined || insert)
|
||||
if (insert)
|
||||
copy.insertAbove(this);
|
||||
var name = this._name,
|
||||
parent = this._parent;
|
||||
|
|
26
dist/docs/classes/CompoundPath.html
vendored
26
dist/docs/classes/CompoundPath.html
vendored
|
@ -2981,21 +2981,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -3330,11 +3334,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3356,7 +3360,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/Group.html
vendored
26
dist/docs/classes/Group.html
vendored
|
@ -2884,21 +2884,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -3233,11 +3237,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3259,7 +3263,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/Item.html
vendored
26
dist/docs/classes/Item.html
vendored
|
@ -2641,21 +2641,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -2990,11 +2994,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3016,7 +3020,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/Layer.html
vendored
26
dist/docs/classes/Layer.html
vendored
|
@ -2798,21 +2798,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -3147,11 +3151,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3173,7 +3177,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/Path.html
vendored
26
dist/docs/classes/Path.html
vendored
|
@ -5840,21 +5840,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -6189,11 +6193,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -6215,7 +6219,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/PathItem.html
vendored
26
dist/docs/classes/PathItem.html
vendored
|
@ -4267,21 +4267,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -4616,11 +4620,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -4642,7 +4646,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/PointText.html
vendored
26
dist/docs/classes/PointText.html
vendored
|
@ -2807,21 +2807,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -3156,11 +3160,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3182,7 +3186,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
8
dist/docs/classes/Project.html
vendored
8
dist/docs/classes/Project.html
vendored
|
@ -447,9 +447,9 @@ var path2 = new Path.Circle(new Point(175, 50), 20);
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
|
@ -473,7 +473,7 @@ var path2 = new Path.Circle(new Point(175, 50), 20);
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: true }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/Raster.html
vendored
26
dist/docs/classes/Raster.html
vendored
|
@ -3592,21 +3592,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -3941,11 +3945,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3967,7 +3971,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/Shape.html
vendored
26
dist/docs/classes/Shape.html
vendored
|
@ -3362,21 +3362,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -3711,11 +3715,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3737,7 +3741,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/SymbolItem.html
vendored
26
dist/docs/classes/SymbolItem.html
vendored
|
@ -2778,21 +2778,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -3127,11 +3131,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3153,7 +3157,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
26
dist/docs/classes/TextItem.html
vendored
26
dist/docs/classes/TextItem.html
vendored
|
@ -2895,21 +2895,25 @@ circle.set({
|
|||
|
||||
<div id="clone" class="member">
|
||||
<div class="member-link">
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([insert])</tt></a>
|
||||
<a name="clone" href="#clone"><tt><b>clone</b>([options])</tt></a>
|
||||
</div>
|
||||
<div class="member-description hidden">
|
||||
<div class="member-text">
|
||||
<p>Clones the item within the same project and places the copy above the item.</p>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>insert: undefined</tt> — specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original — default: <tt>true</tt></li>
|
||||
<li><tt>deep: undefined</tt> — specifies whether the item’s children should also be cloned — default: <tt>true</tt></li>
|
||||
</ul>
|
||||
|
||||
<ul class="member-list">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<li>
|
||||
<tt>insert:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
|
||||
— optional, default: <tt>true</tt>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ insert: true, deep: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -3244,11 +3248,11 @@ function onMouseDown(event) {
|
|||
<h4>Options:</h4>
|
||||
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
||||
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test again a certain item class and its sub-classes: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path and shape items, taking into account the setting of stroke color and width</li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
||||
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items — default: <tt>true</tt></li>
|
||||
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width — default: <tt>true</tt></li>
|
||||
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items — default: <tt>true</tt></li>
|
||||
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments</li>
|
||||
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
||||
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
||||
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
||||
|
@ -3270,7 +3274,7 @@ function onMouseDown(event) {
|
|||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
13
dist/paper-core.js
vendored
13
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Tue Feb 9 15:09:39 2016 +0100
|
||||
* Date: Tue Feb 9 16:01:06 2016 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -3408,15 +3408,18 @@ new function() {
|
|||
return Base.equals(this._children, item._children);
|
||||
},
|
||||
|
||||
clone: function(insert) {
|
||||
clone: function(options) {
|
||||
var copy = new this.constructor(Item.NO_INSERT),
|
||||
children = this._children;
|
||||
children = this._children,
|
||||
insert = Base.pick(options && options.insert, true),
|
||||
deep = Base.pick(options && options.deep, true);
|
||||
if (children)
|
||||
copy.copyAttributes(this);
|
||||
copy.copyContent(this);
|
||||
if (!children || deep)
|
||||
copy.copyContent(this);
|
||||
if (!children)
|
||||
copy.copyAttributes(this);
|
||||
if (insert === undefined || insert)
|
||||
if (insert)
|
||||
copy.insertAbove(this);
|
||||
var name = this._name,
|
||||
parent = this._parent;
|
||||
|
|
8
dist/paper-core.min.js
vendored
8
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
13
dist/paper-full.js
vendored
13
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Tue Feb 9 15:09:39 2016 +0100
|
||||
* Date: Tue Feb 9 16:01:06 2016 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -3408,15 +3408,18 @@ new function() {
|
|||
return Base.equals(this._children, item._children);
|
||||
},
|
||||
|
||||
clone: function(insert) {
|
||||
clone: function(options) {
|
||||
var copy = new this.constructor(Item.NO_INSERT),
|
||||
children = this._children;
|
||||
children = this._children,
|
||||
insert = Base.pick(options && options.insert, true),
|
||||
deep = Base.pick(options && options.deep, true);
|
||||
if (children)
|
||||
copy.copyAttributes(this);
|
||||
copy.copyContent(this);
|
||||
if (!children || deep)
|
||||
copy.copyContent(this);
|
||||
if (!children)
|
||||
copy.copyAttributes(this);
|
||||
if (insert === undefined || insert)
|
||||
if (insert)
|
||||
copy.insertAbove(this);
|
||||
var name = this._name,
|
||||
parent = this._parent;
|
||||
|
|
14
dist/paper-full.min.js
vendored
14
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue