Skip to content

Commit

Permalink
fix(): positionHandler signature
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Oct 31, 2022
1 parent 5afe4c6 commit b8b8d5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/controls/control.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,7 @@ export class Control {
this.visible = visibility;
}

positionHandler(
dim: Point,
finalMatrix: TMat2D,
fabricObject: FabricObject,
currentControl: Control
) {
positionHandler(dim: Point, finalMatrix: TMat2D, fabricObject: FabricObject) {
return new Point(
this.x * dim.x + this.offsetX,
this.y * dim.y + this.offsetY
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/object_interactivity.mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export class InteractiveFabricObject extends FabricObject {
coords: Record<string, TOCoord> = {};

this.forEachControl((control, key) => {
const position = control.positionHandler(dim, finalMatrix, this, control);
const position = control.positionHandler(dim, finalMatrix, this);
coords[key] = Object.assign(
position,
this._calcCornerCoords(control, position)
Expand Down

0 comments on commit b8b8d5b

Please sign in to comment.