diff --git a/area.js b/area.js index 9192106..f2165d1 100644 --- a/area.js +++ b/area.js @@ -630,7 +630,6 @@ var DrawingArea = new Lang.Class({ color: this.currentColor, eraser: eraser, image: this.currentImage, - operator: this.currentOperator, points: [] }); } else { diff --git a/elements.js b/elements.js index 52ea4c4..cd4ee90 100644 --- a/elements.js +++ b/elements.js @@ -767,19 +767,13 @@ const ImageElement = new Lang.Class({ Name: 'DrawOnYourScreenImageElement', Extends: _DrawingElement, - _init: function(params) { - params.fill = false; - this.parent(params); - }, - toJSON: function() { return { shape: this.shape, color: this.color, - fill: this.fill, eraser: this.eraser, transformations: this.transformations, - image: this.image.toJson(), + image: this.image, preserveAspectRatio: this.preserveAspectRatio, points: this.points.map((point) => [Math.round(point[0]*100)/100, Math.round(point[1]*100)/100]) }; diff --git a/files.js b/files.js index 408d078..924b006 100644 --- a/files.js +++ b/files.js @@ -97,7 +97,7 @@ var Image = new Lang.Class({ return this.displayName; }, - toJson: function() { + toJSON: function() { return { displayName: this.displayName, contentType: this.contentType,