Prebuilt module for commit e179b08156

This commit is contained in:
Paper.js Bot 2016-02-09 15:07:08 +00:00
parent ed3bd54881
commit 4e222a6dff
17 changed files with 204 additions and 151 deletions

View file

@ -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;

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: true }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

View file

@ -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> &mdash; specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>deep: undefined</tt> &mdash; specifies whether the item&rsquo;s children should also be cloned &mdash;&nbsp;default: <tt>true</tt></li>
</ul>
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>insert:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;specifies whether the copy should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the original
&mdash;&nbsp;optional, default: <tt>true</tt>
<tt>options:</tt>
<tt>Object</tt>
&mdash;&nbsp;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> &mdash; the tolerance of the hit-test &mdash;&nbsp;default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
<li><tt>options.class: <tt>Function</tt></tt> &mdash; 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>, &hellip;</li>
<li><tt>options.fill: <tt>Boolean</tt></tt> &mdash; hit-test the fill of items</li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; hit-test the fill of items &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.stroke: <tt>Boolean</tt></tt> &mdash; hit-test the stroke of path items, taking into account the setting of stroke color and width &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.segments: <tt>Boolean</tt></tt> &mdash; 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 &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>options.curves: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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> &mdash; 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> &mdash; only hit-test for the first or last segment points of open path items</li>
<li><tt>options.bounds: <tt>Boolean</tt></tt> &mdash; 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> &mdash; 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>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: 2 }</tt>
&mdash;&nbsp;optional, default: <tt>{ fill: true, stroke: true, segments: true, tolerance: settings.hitTolerance }</tt>
</li>
</ul>

13
dist/paper-core.js vendored
View file

@ -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;

File diff suppressed because one or more lines are too long

13
dist/paper-full.js vendored
View file

@ -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;

File diff suppressed because one or more lines are too long