mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-17 09:22:02 -04:00
Switch to #pathData for JSON serialization of Path and CompoundPath.
This commit is contained in:
parent
5fbc6e939d
commit
cef30f9dd1
5 changed files with 11 additions and 6 deletions
File diff suppressed because one or more lines are too long
|
@ -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...);
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
|
@ -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
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue