From 8375a97d555299a24cd3c273bbef50592add8107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 14 May 2011 15:59:19 +0100 Subject: [PATCH] Scope setting / restoring can be simplified since it should never be nested. --- src/core/PaperScope.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/PaperScope.js b/src/core/PaperScope.js index 68812b96..48c3d3c2 100644 --- a/src/core/PaperScope.js +++ b/src/core/PaperScope.js @@ -42,15 +42,13 @@ var PaperScope = this.PaperScope = Base.extend({ // Methods for setting and restoring paper scopes: statics: { - scopes: [], - set: function(scope) { - this.scopes.push(paper); + this.previous = paper; paper = scope; }, restore: function() { - paper = this.scopes.pop(); + paper = this.previous; } } });