From 55b2231d7badec16990b63ef1b6c770ef1e6fc25 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 16 Mar 2012 15:17:53 -0700 Subject: Supporting new and old GL data formats. --- js/lib/drawing/world.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'js/lib/drawing/world.js') diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js index 4b117242..0ee66abe 100755 --- a/js/lib/drawing/world.js +++ b/js/lib/drawing/world.js @@ -754,7 +754,14 @@ World.prototype.exportJSON = function() // convert the object to a string var jStr = JSON.stringify( worldObj ); - // the RDGE export function corrupts the data. + // prepend some version information to the string. + // this string is also used to differentiate between JSON + // and pre-JSON versions of fileIO. + // the ending ';' in the version string is necessary + jStr = "v1.0;" + jStr; + + // You would think that the RDGE export function + // would not change the data. You would be wrong... // rebuild the tree var root = this._rootNode; root.children = new Array(); -- cgit v1.2.3