mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Define settings.applyMatrix and inherit at Item creation time.
This commit is contained in:
parent
7dbf6ceaff
commit
d594b4264d
2 changed files with 5 additions and 0 deletions
|
@ -49,6 +49,7 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
||||||
paper = this;
|
paper = this;
|
||||||
// Default configurable settings.
|
// Default configurable settings.
|
||||||
this.settings = {
|
this.settings = {
|
||||||
|
applyMatrix: true,
|
||||||
handleSize: 4,
|
handleSize: 4,
|
||||||
hitTolerance: 0
|
hitTolerance: 0
|
||||||
};
|
};
|
||||||
|
@ -89,6 +90,8 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
||||||
/**
|
/**
|
||||||
* Gives access to paper's configurable settings.
|
* Gives access to paper's configurable settings.
|
||||||
*
|
*
|
||||||
|
* <b>settings.applyMatrix:</b>
|
||||||
|
*
|
||||||
* <b>settings.handleSize:</b>
|
* <b>settings.handleSize:</b>
|
||||||
*
|
*
|
||||||
* <b>settings.hitTolerance:</b>
|
* <b>settings.hitTolerance:</b>
|
||||||
|
|
|
@ -96,6 +96,8 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
||||||
project = paper.project;
|
project = paper.project;
|
||||||
if (!internal)
|
if (!internal)
|
||||||
this._id = Item._id = (Item._id || 0) + 1;
|
this._id = Item._id = (Item._id || 0) + 1;
|
||||||
|
// Inherit the applyMatrix setting from paper.settings.applyMatrix
|
||||||
|
this._applyMatrix = this._canApplyMatrix && paper.settings.applyMatrix;
|
||||||
// Handle matrix before everything else, to avoid issues with
|
// Handle matrix before everything else, to avoid issues with
|
||||||
// #addChild() calling _changed() and accessing _matrix already.
|
// #addChild() calling _changed() and accessing _matrix already.
|
||||||
if (point)
|
if (point)
|
||||||
|
|
Loading…
Reference in a new issue