Skip to content

Commit

Permalink
updatedlib
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur committed Nov 23, 2017
1 parent 5db0da0 commit 7fdccee
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build/files/src/brushes/pencil_brush.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
var path = [], i, width = this.width / 1000,
p1 = new fabric.Point(points[0].x, points[0].y),
p2 = new fabric.Point(points[1].x, points[1].y),
len = points.length, multSignX, multSignY, manyPoints = len > 2;
len = points.length, multSignX = 1, multSignY = 1, manyPoints = len > 2;

if (manyPoints) {
multSignX = points[2].x < p2.x ? -1 : points[2].x === p2.x ? 0 : 1;
Expand Down
3 changes: 2 additions & 1 deletion build/files/src/mixins/object_geometry.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@
prefix = this.group.transformMatrixKey(skipGroup) + sep;
};
return prefix + this.top + sep + this.left + sep + this.scaleX + sep + this.scaleY +
sep + this.skewX + sep + this.skewY + sep + this.angle + sep + this.flipX + sep + this.flipY;
sep + this.skewX + sep + this.skewY + sep + this.angle + sep + this.flipX + sep + this.flipY +
sep + this.width + sep + this.height;
},

/**
Expand Down
8 changes: 1 addition & 7 deletions build/files/src/shapes/image.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
return;
}

var stateProperties = fabric.Object.prototype.stateProperties.concat();
stateProperties.push(
'cropX',
'cropY'
);

/**
* Image class
* @class fabric.Image
Expand Down Expand Up @@ -95,7 +89,7 @@
* as well as for history (undo/redo) purposes
* @type Array
*/
stateProperties: stateProperties,
stateProperties: fabric.Object.prototype.stateProperties.concat('cropX', 'cropY'),

/**
* When `true`, object is cached on an additional canvas.
Expand Down
13 changes: 4 additions & 9 deletions lib/fabric.js
Original file line number Diff line number Diff line change
Expand Up @@ -8306,7 +8306,7 @@ fabric.BaseBrush = fabric.util.createClass(/** @lends fabric.BaseBrush.prototype
var path = [], i, width = this.width / 1000,
p1 = new fabric.Point(points[0].x, points[0].y),
p2 = new fabric.Point(points[1].x, points[1].y),
len = points.length, multSignX, multSignY, manyPoints = len > 2;
len = points.length, multSignX = 1, multSignY = 1, manyPoints = len > 2;

if (manyPoints) {
multSignX = points[2].x < p2.x ? -1 : points[2].x === p2.x ? 0 : 1;
Expand Down Expand Up @@ -14344,7 +14344,8 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
prefix = this.group.transformMatrixKey(skipGroup) + sep;
};
return prefix + this.top + sep + this.left + sep + this.scaleX + sep + this.scaleY +
sep + this.skewX + sep + this.skewY + sep + this.angle + sep + this.flipX + sep + this.flipY;
sep + this.skewX + sep + this.skewY + sep + this.angle + sep + this.flipX + sep + this.flipY +
sep + this.width + sep + this.height;
},

/**
Expand Down Expand Up @@ -18659,12 +18660,6 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
return;
}

var stateProperties = fabric.Object.prototype.stateProperties.concat();
stateProperties.push(
'cropX',
'cropY'
);

/**
* Image class
* @class fabric.Image
Expand Down Expand Up @@ -18741,7 +18736,7 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
* as well as for history (undo/redo) purposes
* @type Array
*/
stateProperties: stateProperties,
stateProperties: fabric.Object.prototype.stateProperties.concat('cropX', 'cropY'),

/**
* When `true`, object is cached on an additional canvas.
Expand Down

0 comments on commit 7fdccee

Please sign in to comment.