mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Scope setting / restoring can be simplified since it should never be nested.
This commit is contained in:
parent
c89fcdcb2e
commit
8375a97d55
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue