image element, minor
* image.toJson -> image.toJSON. * remove unused 'fill' and 'operator' properties.
This commit is contained in:
parent
27e194905b
commit
532b9242c9
1
area.js
1
area.js
|
|
@ -630,7 +630,6 @@ var DrawingArea = new Lang.Class({
|
||||||
color: this.currentColor,
|
color: this.currentColor,
|
||||||
eraser: eraser,
|
eraser: eraser,
|
||||||
image: this.currentImage,
|
image: this.currentImage,
|
||||||
operator: this.currentOperator,
|
|
||||||
points: []
|
points: []
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -767,19 +767,13 @@ const ImageElement = new Lang.Class({
|
||||||
Name: 'DrawOnYourScreenImageElement',
|
Name: 'DrawOnYourScreenImageElement',
|
||||||
Extends: _DrawingElement,
|
Extends: _DrawingElement,
|
||||||
|
|
||||||
_init: function(params) {
|
|
||||||
params.fill = false;
|
|
||||||
this.parent(params);
|
|
||||||
},
|
|
||||||
|
|
||||||
toJSON: function() {
|
toJSON: function() {
|
||||||
return {
|
return {
|
||||||
shape: this.shape,
|
shape: this.shape,
|
||||||
color: this.color,
|
color: this.color,
|
||||||
fill: this.fill,
|
|
||||||
eraser: this.eraser,
|
eraser: this.eraser,
|
||||||
transformations: this.transformations,
|
transformations: this.transformations,
|
||||||
image: this.image.toJson(),
|
image: this.image,
|
||||||
preserveAspectRatio: this.preserveAspectRatio,
|
preserveAspectRatio: this.preserveAspectRatio,
|
||||||
points: this.points.map((point) => [Math.round(point[0]*100)/100, Math.round(point[1]*100)/100])
|
points: this.points.map((point) => [Math.round(point[0]*100)/100, Math.round(point[1]*100)/100])
|
||||||
};
|
};
|
||||||
|
|
|
||||||
2
files.js
2
files.js
|
|
@ -97,7 +97,7 @@ var Image = new Lang.Class({
|
||||||
return this.displayName;
|
return this.displayName;
|
||||||
},
|
},
|
||||||
|
|
||||||
toJson: function() {
|
toJSON: function() {
|
||||||
return {
|
return {
|
||||||
displayName: this.displayName,
|
displayName: this.displayName,
|
||||||
contentType: this.contentType,
|
contentType: this.contentType,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue