aboutsummaryrefslogtreecommitdiff
path: root/js/lib/drawing
diff options
context:
space:
mode:
authorPushkar Joshi2012-03-27 12:42:42 -0700
committerPushkar Joshi2012-03-27 12:42:42 -0700
commit903b01b9d0501e6f974034273385a0517107b1e3 (patch)
tree53319628620ce05f789e11622209dc93d505d6bb /js/lib/drawing
parentc6b91c52cba4ea4972ecc07a237f543e35d608b9 (diff)
downloadninja-903b01b9d0501e6f974034273385a0517107b1e3.tar.gz
File IO for the brush stroke AND changing the data type of brush stroke from GEOM_TYPE_CUBIC_BEZIER to GEOM_TYPE_BRUSH_STROKE
Diffstat (limited to 'js/lib/drawing')
-rwxr-xr-xjs/lib/drawing/world.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js
index 781695b6..1552178d 100755
--- a/js/lib/drawing/world.js
+++ b/js/lib/drawing/world.js
@@ -931,6 +931,7 @@ World.prototype.importObjectsJSON = function( jObj, parentGeomObj )
931World.prototype.importObjectJSON = function( jObj, parentGeomObj ) 931World.prototype.importObjectJSON = function( jObj, parentGeomObj )
932{ 932{
933 var type = jObj.type; 933 var type = jObj.type;
934 var BrushStroke = require("js/lib/geom/brush-stroke").BrushStroke;
934 935
935 var obj; 936 var obj;
936 switch (type) 937 switch (type)
@@ -950,6 +951,11 @@ World.prototype.importObjectJSON = function( jObj, parentGeomObj )
950 obj.importJSON( jObj ); 951 obj.importJSON( jObj );
951 break; 952 break;
952 953
954 case 6: //brush stroke
955 obj = new BrushStroke();
956 obj.importJSON(jObj);
957 break;
958
953 default: 959 default:
954 throw new Error( "Unrecognized object type: " + type ); 960 throw new Error( "Unrecognized object type: " + type );
955 break; 961 break;