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:
Jürg Lehni 2016-05-04 18:06:18 -07:00
parent 4f65996d34
commit 681d5537b3
3 changed files with 6 additions and 6 deletions

View file

@ -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() {

View file

@ -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() {

View file

@ -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) {