mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Always pass on dictionary object in _serialize()
It is used to determine if ojects can be serialized in compact form.
This commit is contained in:
parent
4f65996d34
commit
681d5537b3
3 changed files with 6 additions and 6 deletions
|
@ -97,8 +97,8 @@ var Matrix = Base.extend(/** @lends Matrix# */{
|
|||
return this;
|
||||
},
|
||||
|
||||
_serialize: function(options) {
|
||||
return Base.serialize(this.getValues(), options);
|
||||
_serialize: function(options, dictionary) {
|
||||
return Base.serialize(this.getValues(), options, true, dictionary);
|
||||
},
|
||||
|
||||
_changed: function() {
|
||||
|
|
|
@ -118,13 +118,13 @@ var Curve = Base.extend(/** @lends Curve# */{
|
|||
this._segment2 = seg2 || new Segment(point2, handle2, null);
|
||||
},
|
||||
|
||||
_serialize: function(options) {
|
||||
_serialize: function(options, dictionary) {
|
||||
// If it has no handles, only serialize points, otherwise handles too.
|
||||
return Base.serialize(this.hasHandles()
|
||||
? [this.getPoint1(), this.getHandle1(), this.getHandle2(),
|
||||
this.getPoint2()]
|
||||
: [this.getPoint1(), this.getPoint2()],
|
||||
options, true);
|
||||
options, true, dictionary);
|
||||
},
|
||||
|
||||
_changed: function() {
|
||||
|
|
|
@ -149,7 +149,7 @@ var Segment = Base.extend(/** @lends Segment# */{
|
|||
this.setSelection(selection);
|
||||
},
|
||||
|
||||
_serialize: function(options) {
|
||||
_serialize: function(options, dictionary) {
|
||||
// If it is has no handles, only serialize point, otherwise handles too.
|
||||
var point = this._point,
|
||||
selection = this._selection,
|
||||
|
@ -158,7 +158,7 @@ var Segment = Base.extend(/** @lends Segment# */{
|
|||
: point;
|
||||
if (selection)
|
||||
obj.push(selection);
|
||||
return Base.serialize(obj, options, true);
|
||||
return Base.serialize(obj, options, true, dictionary);
|
||||
},
|
||||
|
||||
_changed: function(point) {
|
||||
|
|
Loading…
Reference in a new issue