Fix fabric.Line regression.

This commit is contained in:
kangax 2012-06-28 21:14:19 +02:00
parent 8581f94341
commit c988e5a8c3
4 changed files with 7 additions and 5 deletions

5
dist/all.js vendored
View file

@ -8674,8 +8674,9 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
_setWidthHeight: function(options) {
options || (options = { });
this.set('width', 'width' in options ? options.width : ((this.x2 - this.x1) || 1));
this.set('height', 'height' in options ? options.height : ((this.y2 - this.y1) || 1));
this.set('width', (this.x2 - this.x1) || 1);
this.set('height', (this.y2 - this.y1) || 1);
this.set('left', 'left' in options ? options.left : (this.x1 + this.width / 2));
this.set('top', 'top' in options ? options.top : (this.y1 + this.height / 2));
},

2
dist/all.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/all.min.js.gz vendored

Binary file not shown.

View file

@ -49,8 +49,9 @@
_setWidthHeight: function(options) {
options || (options = { });
this.set('width', 'width' in options ? options.width : ((this.x2 - this.x1) || 1));
this.set('height', 'height' in options ? options.height : ((this.y2 - this.y1) || 1));
this.set('width', (this.x2 - this.x1) || 1);
this.set('height', (this.y2 - this.y1) || 1);
this.set('left', 'left' in options ? options.left : (this.x1 + this.width / 2));
this.set('top', 'top' in options ? options.top : (this.y1 + this.height / 2));
},