File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,12 +137,15 @@ var PaperScope = this.PaperScope = Base.extend(/** @lends PaperScope# */{
137137 }
138138 } ) ;
139139 } ) ;
140- // Use scope as side-car (= 'this' inside iterator), and have it
141- // returned at the end.
142- return Base . each ( this , function ( value , key ) {
143- if ( ! ( key in this ) )
144- this [ key ] = value ;
145- } , scope ) ;
140+ // Copy over all fields from this scope to the destination.
141+ // Do not use Base.each, since we also want to enumerate over
142+ // fields on PaperScope.prototype, e.g. all classes
143+ for ( var key in this ) {
144+ if ( ! / ^ ( v e r s i o n | _ i d | l o a d ) / . test ( key ) && ! ( key in scope ) ) {
145+ console . log ( key ) ;
146+ scope [ key ] = this [ key ] ;
147+ }
148+ }
146149 } ,
147150
148151 /**
Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ var paper = new function() {
127127// the first PaperScope and return it, all in one statement.
128128// The version for 'dev' of this happens in core/initialize.js, since it depends
129129// on sequentiality of include() loading.
130+ // Mark this object as enumerable, so all the injected classes can be enumerated
131+ // again in PaperScope#install().
132+ this . enumerable = true ;
130133return new ( PaperScope . inject ( this ) ) ;
131134/*#*/ } // options.version != 'dev'
132135} ;
You can’t perform that action at this time.
0 commit comments