Skip to content

Commit

Permalink
Revert "fix: bind eraser to initial transform matrix"
Browse files Browse the repository at this point in the history
This reverts commit 302a23b.
  • Loading branch information
ShaMan123 committed Apr 7, 2021
1 parent cce4ac1 commit e19b91b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/brushes/eraser_brush.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@
inverted: true,
dirty: true,
eraser: mergedEraserPaths
});
obj.freezeClipPathTransformMatrix();
})
},

/**
Expand Down
10 changes: 1 addition & 9 deletions src/shapes/object.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -1172,14 +1172,6 @@
return !!this.shadow && (this.shadow.offsetX !== 0 || this.shadow.offsetY !== 0);
},

/**
* Used by @class fabric.EraserBrush to position the erased paths
*/
_clipPathTransformMatrix: null,
freezeClipPathTransformMatrix: function () {
this._clipPathTransformMatrix = this.calcTransformMatrix();
},

/**
* Execute the drawing operation for an object clipPath
* @param {CanvasRenderingContext2D} ctx Context to render on
Expand All @@ -1197,7 +1189,7 @@
}
//ctx.scale(1 / 2, 1 / 2);
if (path.absolutePositioned) {
var m = fabric.util.invertTransform(this._clipPathTransformMatrix || this.calcTransformMatrix());
var m = fabric.util.invertTransform(this.calcTransformMatrix());
ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
}
path.transform(ctx);
Expand Down

0 comments on commit e19b91b

Please sign in to comment.