mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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;
|
||||
// Default configurable settings.
|
||||
this.settings = {
|
||||
applyMatrix: true,
|
||||
handleSize: 4,
|
||||
hitTolerance: 0
|
||||
};
|
||||
|
@ -89,6 +90,8 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
|||
/**
|
||||
* Gives access to paper's configurable settings.
|
||||
*
|
||||
* <b>settings.applyMatrix:</b>
|
||||
*
|
||||
* <b>settings.handleSize:</b>
|
||||
*
|
||||
* <b>settings.hitTolerance:</b>
|
||||
|
|
|
@ -96,6 +96,8 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
project = paper.project;
|
||||
if (!internal)
|
||||
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
|
||||
// #addChild() calling _changed() and accessing _matrix already.
|
||||
if (point)
|
||||
|
|
Loading…
Reference in a new issue