Prebuilt module for commit 4e7fa2f04e

This commit is contained in:
Paper.js Bot 2016-02-14 20:37:33 +00:00
parent b4cf0c6fcd
commit 105f4fba9c
6 changed files with 49 additions and 36 deletions

View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Sun Feb 14 17:16:40 2016 +0100
* Date: Sun Feb 14 21:34:35 2016 +0100
*
***
*
@ -720,6 +720,7 @@ var PaperScope = Base.extend({
paper = this;
this.settings = new Base({
applyMatrix: true,
insertItems: true,
handleSize: 4,
hitTolerance: 0
});
@ -2641,7 +2642,7 @@ var Project = PaperScopeItem.extend({
},
getActiveLayer: function() {
return this._activeLayer || new Layer({ project: this });
return this._activeLayer || new Layer({ project: this, insert: true });
},
getSymbolDefinitions: function() {
@ -2874,15 +2875,17 @@ new function() {
var hasProps = props && Base.isPlainObject(props),
internal = hasProps && props.internal === true,
matrix = this._matrix = new Matrix(),
project = hasProps && props.project || paper.project;
project = hasProps && props.project || paper.project,
settings = paper.settings;
this._id = internal ? null : UID.get();
this._parent = this._index = null;
this._applyMatrix = this._canApplyMatrix && paper.settings.applyMatrix;
this._applyMatrix = this._canApplyMatrix && settings.applyMatrix;
if (point)
matrix.translate(point);
matrix._owner = this;
this._style = new Style(project._currentStyle, this, project);
if (internal || hasProps && props.insert === false) {
if (internal || hasProps && props.insert === false
|| !settings.insertItems && !(hasProps && props.insert === true)) {
this._setProject(project);
} else {
(hasProps && props.parent || project)
@ -3812,8 +3815,9 @@ new function() {
if (_proto && !(item instanceof _proto)) {
items.splice(i, 1);
} else {
var shift = item._parent === this && item._index < index;
if (item._remove(false, true) && shift)
var parent = item._parent,
shift = parent === this && item._index < index;
if (parent && item._remove(false, true) && shift)
index--;
}
}

View file

@ -108,9 +108,10 @@
</ul>
<ul class="member-list">
<h4>Options:</h4>
<li><tt>settings.applyMatrix: <tt>Boolean</tt></tt> &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>settings.handleSize: <tt>Number</tt></tt> &mdash;&nbsp;default: <tt>4</tt></li>
<li><tt>settings.hitTolerance: <tt>Number</tt></tt> &mdash;&nbsp;default: <tt>0</tt></li>
<li><tt>settings.insertItems: <tt>Boolean</tt></tt> &mdash; controls whether newly created items are automatically inserted into the scene graph, by adding them to <tt>Project#getActiveLayer</tt>() &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>settings.applyMatrix: <tt>Boolean</tt></tt> &mdash; controls what value newly created items have their <tt>Item#getApplyMatrix</tt>() property set to (Note that not all items can set this to <code>false</code>) &mdash;&nbsp;default: <tt>true</tt></li>
<li><tt>settings.handleSize: <tt>Number</tt></tt> &mdash; the size of the curve handles when drawing selections &mdash;&nbsp;default: <tt>4</tt></li>
<li><tt>settings.hitTolerance: <tt>Number</tt></tt> &mdash; the default tolerance for hit- tests, when no value is specified &mdash;&nbsp;default: <tt>0</tt></li>
</ul>

18
dist/paper-core.js vendored
View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Sun Feb 14 17:16:40 2016 +0100
* Date: Sun Feb 14 21:34:35 2016 +0100
*
***
*
@ -720,6 +720,7 @@ var PaperScope = Base.extend({
paper = this;
this.settings = new Base({
applyMatrix: true,
insertItems: true,
handleSize: 4,
hitTolerance: 0
});
@ -2641,7 +2642,7 @@ var Project = PaperScopeItem.extend({
},
getActiveLayer: function() {
return this._activeLayer || new Layer({ project: this });
return this._activeLayer || new Layer({ project: this, insert: true });
},
getSymbolDefinitions: function() {
@ -2874,15 +2875,17 @@ new function() {
var hasProps = props && Base.isPlainObject(props),
internal = hasProps && props.internal === true,
matrix = this._matrix = new Matrix(),
project = hasProps && props.project || paper.project;
project = hasProps && props.project || paper.project,
settings = paper.settings;
this._id = internal ? null : UID.get();
this._parent = this._index = null;
this._applyMatrix = this._canApplyMatrix && paper.settings.applyMatrix;
this._applyMatrix = this._canApplyMatrix && settings.applyMatrix;
if (point)
matrix.translate(point);
matrix._owner = this;
this._style = new Style(project._currentStyle, this, project);
if (internal || hasProps && props.insert === false) {
if (internal || hasProps && props.insert === false
|| !settings.insertItems && !(hasProps && props.insert === true)) {
this._setProject(project);
} else {
(hasProps && props.parent || project)
@ -3812,8 +3815,9 @@ new function() {
if (_proto && !(item instanceof _proto)) {
items.splice(i, 1);
} else {
var shift = item._parent === this && item._index < index;
if (item._remove(false, true) && shift)
var parent = item._parent,
shift = parent === this && item._index < index;
if (parent && item._remove(false, true) && shift)
index--;
}
}

File diff suppressed because one or more lines are too long

18
dist/paper-full.js vendored
View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Sun Feb 14 17:16:40 2016 +0100
* Date: Sun Feb 14 21:34:35 2016 +0100
*
***
*
@ -720,6 +720,7 @@ var PaperScope = Base.extend({
paper = this;
this.settings = new Base({
applyMatrix: true,
insertItems: true,
handleSize: 4,
hitTolerance: 0
});
@ -2641,7 +2642,7 @@ var Project = PaperScopeItem.extend({
},
getActiveLayer: function() {
return this._activeLayer || new Layer({ project: this });
return this._activeLayer || new Layer({ project: this, insert: true });
},
getSymbolDefinitions: function() {
@ -2874,15 +2875,17 @@ new function() {
var hasProps = props && Base.isPlainObject(props),
internal = hasProps && props.internal === true,
matrix = this._matrix = new Matrix(),
project = hasProps && props.project || paper.project;
project = hasProps && props.project || paper.project,
settings = paper.settings;
this._id = internal ? null : UID.get();
this._parent = this._index = null;
this._applyMatrix = this._canApplyMatrix && paper.settings.applyMatrix;
this._applyMatrix = this._canApplyMatrix && settings.applyMatrix;
if (point)
matrix.translate(point);
matrix._owner = this;
this._style = new Style(project._currentStyle, this, project);
if (internal || hasProps && props.insert === false) {
if (internal || hasProps && props.insert === false
|| !settings.insertItems && !(hasProps && props.insert === true)) {
this._setProject(project);
} else {
(hasProps && props.parent || project)
@ -3812,8 +3815,9 @@ new function() {
if (_proto && !(item instanceof _proto)) {
items.splice(i, 1);
} else {
var shift = item._parent === this && item._index < index;
if (item._remove(false, true) && shift)
var parent = item._parent,
shift = parent === this && item._index < index;
if (parent && item._remove(false, true) && shift)
index--;
}
}

File diff suppressed because one or more lines are too long