Scope setting / restoring can be simplified since it should never be nested.

This commit is contained in:
Jürg Lehni 2011-05-14 15:59:19 +01:00
parent c89fcdcb2e
commit 8375a97d55

View file

@ -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;
}
}
});