From d594b4264ded4855ccc24b4577b4bf4c434bc559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 4 Mar 2014 09:30:04 +0100 Subject: [PATCH] Define settings.applyMatrix and inherit at Item creation time. --- src/core/PaperScope.js | 3 +++ src/item/Item.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/core/PaperScope.js b/src/core/PaperScope.js index a392a789..87ef3880 100644 --- a/src/core/PaperScope.js +++ b/src/core/PaperScope.js @@ -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. * + * settings.applyMatrix: + * * settings.handleSize: * * settings.hitTolerance: diff --git a/src/item/Item.js b/src/item/Item.js index 0fdd983e..1c172542 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -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)