-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,6 +171,14 @@ export class Control { | |
*/ | ||
declare mouseUpHandler?: ControlActionHandler; | ||
|
||
shouldActivate(controlKey: string, fabricObject: InteractiveFabricObject) { | ||
// TODO: locking logic can be handled here instead of in the control handler logic | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ShaMan123
Author
Contributor
|
||
return ( | ||
fabricObject.canvas?.getActiveObject() === fabricObject && | ||
fabricObject.isControlVisible(controlKey) | ||
); | ||
} | ||
|
||
/** | ||
* Returns control actionHandler | ||
* @param {Event} eventData the native mouse event | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmm this TODO isn't doable.
shouldActivate with the current parameter does not know what the actionHandler will do.
So you don't know if is lockScaling, lockSkewing or whatever, you are not passin the current trasnfrom either so how woudl we know how to add some lock logic here?