Switch to #pathData for JSON serialization of Path and CompoundPath.

This commit is contained in:
Jürg Lehni 2013-02-28 19:41:13 -08:00
parent 5fbc6e939d
commit cef30f9dd1
5 changed files with 11 additions and 6 deletions

File diff suppressed because one or more lines are too long

View file

@ -21,6 +21,9 @@
*/ */
var Group = this.Group = Item.extend(/** @lends Group# */{ var Group = this.Group = Item.extend(/** @lends Group# */{
_type: 'group', _type: 'group',
_serializeFields: {
children: []
},
// DOCS: document new Group(item, item...); // DOCS: document new Group(item, item...);
/** /**

View file

@ -39,7 +39,6 @@ var Item = this.Item = Base.extend(Callback, {
// that can be ommited. // that can be ommited.
_serializeFields: { _serializeFields: {
name: null, name: null,
children: [],
matrix: new Matrix(), matrix: new Matrix(),
locked: false, locked: false,
visible: true, visible: true,

View file

@ -22,6 +22,10 @@
*/ */
var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath# */{ var CompoundPath = this.CompoundPath = PathItem.extend(/** @lends CompoundPath# */{
_type: 'compoundpath', _type: 'compoundpath',
_serializeFields: {
pathData: null
},
/** /**
* Creates a new compound path item and places it in the active layer. * Creates a new compound path item and places it in the active layer.
* *

View file

@ -21,8 +21,7 @@
var Path = this.Path = PathItem.extend(/** @lends Path# */{ var Path = this.Path = PathItem.extend(/** @lends Path# */{
_type: 'path', _type: 'path',
_serializeFields: { _serializeFields: {
segments: [], pathData: null
closed: false
}, },
/** /**