mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Prebuilt module for commit 4e7fa2f04e
This commit is contained in:
parent
b4cf0c6fcd
commit
105f4fba9c
6 changed files with 49 additions and 36 deletions
18
dist/docs/assets/js/paper.js
vendored
18
dist/docs/assets/js/paper.js
vendored
|
@ -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--;
|
||||
}
|
||||
}
|
||||
|
|
7
dist/docs/classes/PaperScope.html
vendored
7
dist/docs/classes/PaperScope.html
vendored
|
@ -108,9 +108,10 @@
|
|||
</ul>
|
||||
<ul class="member-list">
|
||||
<h4>Options:</h4>
|
||||
<li><tt>settings.applyMatrix: <tt>Boolean</tt></tt> — default: <tt>true</tt></li>
|
||||
<li><tt>settings.handleSize: <tt>Number</tt></tt> — default: <tt>4</tt></li>
|
||||
<li><tt>settings.hitTolerance: <tt>Number</tt></tt> — default: <tt>0</tt></li>
|
||||
<li><tt>settings.insertItems: <tt>Boolean</tt></tt> — controls whether newly created items are automatically inserted into the scene graph, by adding them to <tt>Project#getActiveLayer</tt>() — default: <tt>true</tt></li>
|
||||
<li><tt>settings.applyMatrix: <tt>Boolean</tt></tt> — 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>) — default: <tt>true</tt></li>
|
||||
<li><tt>settings.handleSize: <tt>Number</tt></tt> — the size of the curve handles when drawing selections — default: <tt>4</tt></li>
|
||||
<li><tt>settings.hitTolerance: <tt>Number</tt></tt> — the default tolerance for hit- tests, when no value is specified — default: <tt>0</tt></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
18
dist/paper-core.js
vendored
18
dist/paper-core.js
vendored
|
@ -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--;
|
||||
}
|
||||
}
|
||||
|
|
12
dist/paper-core.min.js
vendored
12
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
18
dist/paper-full.js
vendored
18
dist/paper-full.js
vendored
|
@ -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--;
|
||||
}
|
||||
}
|
||||
|
|
12
dist/paper-full.min.js
vendored
12
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue