Commit first version of serialization / deserialization mechanism.

It appears to work fine already for Paths and Groups.
This commit is contained in:
Jürg Lehni 2012-12-27 12:45:55 +01:00
parent ae4e5d4be5
commit 4f83e0eee6
7 changed files with 147 additions and 4 deletions
src/basic

View file

@ -42,6 +42,8 @@
* matrix multiplication).
*/
var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
_type: 'matrix',
/**
* Creates a 2D affine transform.
*
@ -74,6 +76,10 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
throw new Error('Unsupported matrix parameters');
},
_serialize: function() {
return this.getValues();
},
/**
* @return {Matrix} A copy of this transform.
*/