Skip to content

Commit

Permalink
optional origin
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Nov 28, 2023
1 parent c6dc61b commit 8f0ea2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/EventTypeDefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export type ControlCursorCallback = ControlCallback<string>;
*/
export type Transform = {
target: FabricObject;
action: string;
action?: string;
actionHandler?: TransformActionHandler;
corner: string;
scaleX: number;
Expand Down Expand Up @@ -106,7 +106,7 @@ export interface ModifiedEvent<E extends Event = TPointerEvent>
extends TEvent<E> {
transform: Transform;
target: FabricObject;
action: string;
action?: string;
}

type ModificationEventsSpec<
Expand Down
2 changes: 1 addition & 1 deletion src/shapes/Object/InteractiveObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class InteractiveFabricObject<
if (this.noScaleCache && targetCanvas && targetCanvas._currentTransform) {
const target = targetCanvas._currentTransform.target,
action = targetCanvas._currentTransform.action;
if (this === (target as unknown as this) && action.startsWith('scale')) {
if (this === (target as unknown as this) && action?.startsWith('scale')) {
return false;
}
}
Expand Down

0 comments on commit 8f0ea2e

Please sign in to comment.