mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Properly fix exporting of classes into Base.exports.
This commit is contained in:
parent
7f251b78e3
commit
b896a98b1e
2 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ Base.inject(/** @lends Base# */{
|
|||
statics: /** @lends Base */{
|
||||
|
||||
// Keep track of all named classes for serialization and exporting.
|
||||
exports: new Base(),
|
||||
exports: {},
|
||||
|
||||
extend: function extend(src) {
|
||||
// Override Base.extend() to register named classes in Base.exports,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// First add Base, PaperScript and Numerical to exports, then inject all exports
|
||||
// into PaperScope, and create the initial paper object, all in one statement:
|
||||
paper = new (PaperScope.inject(Base.exports.inject({
|
||||
paper = new (PaperScope.inject(Base.merge(Base.exports, {
|
||||
// Mark fields as enumeralbe so PaperScope.inject can pick them up
|
||||
enumerable: true,
|
||||
Base: Base,
|
||||
|
|
Loading…
Reference in a new issue