Scope the compilation of the whole library and inject produced classes into global scope for now, add options later.

This commit is contained in:
Jürg Lehni 2011-03-03 14:09:20 +00:00
parent 80a5e4513e
commit 6923e168ab

View file

@ -1,3 +1,5 @@
(function(scope) {
#include "Paper.js"
#include "basic/Point.js"
@ -33,3 +35,16 @@
#include "tool/ToolEvent.js"
#include "tool/ToolHandler.js"
#include "tool/Tool.js"
// Now inject all these local prototypes into the paper scope.
Base.each(['Point', 'Size', 'Rectangle', 'Matrix', 'DocumentView', 'Doc',
'Symbol', 'Item', 'Group', 'Layer', 'Raster', 'PlacedSymbol', 'PathStyle',
'Segment', 'Curve', 'PathItem', 'Path', 'CompoundPath', 'Color', 'RGBColor',
'GrayColor', 'GradientColor', 'Gradient', 'GradientStop', 'ToolEvent',
'ToolHandler', 'Tool'],
function(name) {
scope[name] = eval(name);
}
);
})(this);