mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Move paper.populate() functionality back to build.js.
This commit is contained in:
parent
9a9cb91f72
commit
fe1a01ecb6
2 changed files with 9 additions and 14 deletions
10
src/build.js
10
src/build.js
|
@ -39,6 +39,14 @@ var paper = new function() {
|
|||
#include "util/CanvasProvider.js"
|
||||
#include "util/MathUtils.js"
|
||||
|
||||
return paper.populate();
|
||||
// Inject all prototypes from the paper scope into the paper object.
|
||||
return 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) {
|
||||
this[name] = eval(name);
|
||||
}, paper);
|
||||
|
||||
};
|
||||
|
|
13
src/paper.js
13
src/paper.js
|
@ -2,19 +2,6 @@ var paper = {
|
|||
document: null,
|
||||
documents: [],
|
||||
|
||||
populate: function() {
|
||||
// Inject all prototypes from the paper scope into the paper object.
|
||||
// return this so build.js can use 'return paper.populate()'.
|
||||
return 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) {
|
||||
this[name] = eval(name);
|
||||
}, this);
|
||||
},
|
||||
|
||||
install: function(scope) {
|
||||
for (var i in paper) {
|
||||
if (!scope[i])
|
||||
|
|
Loading…
Reference in a new issue