Properly fix exporting of classes into Base.exports.

This commit is contained in:
Jürg Lehni 2013-06-02 16:17:54 -07:00
parent 7f251b78e3
commit b896a98b1e
2 changed files with 2 additions and 2 deletions

View file

@ -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,

View file

@ -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,