mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: image cropping (#8613)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
parent
eb09b48ae6
commit
e957c8e9ee
36 changed files with 2199 additions and 92 deletions
|
@ -176,6 +176,8 @@ export type StaticCanvasAppState = Readonly<
|
|||
gridStep: AppState["gridStep"];
|
||||
frameRendering: AppState["frameRendering"];
|
||||
currentHoveredFontFamily: AppState["currentHoveredFontFamily"];
|
||||
// Cropping
|
||||
croppingElementId: AppState["croppingElementId"];
|
||||
}
|
||||
>;
|
||||
|
||||
|
@ -198,6 +200,9 @@ export type InteractiveCanvasAppState = Readonly<
|
|||
snapLines: AppState["snapLines"];
|
||||
zenModeEnabled: AppState["zenModeEnabled"];
|
||||
editingTextElement: AppState["editingTextElement"];
|
||||
// Cropping
|
||||
isCropping: AppState["isCropping"];
|
||||
croppingElementId: AppState["croppingElementId"];
|
||||
// Search matches
|
||||
searchMatches: AppState["searchMatches"];
|
||||
}
|
||||
|
@ -219,6 +224,7 @@ export type ObservedElementsAppState = {
|
|||
editingLinearElementId: LinearElementEditor["elementId"] | null;
|
||||
// Right now it's coupled to `editingLinearElement`, ideally it should not be really needed as we already have selectedElementIds & editingLinearElementId
|
||||
selectedLinearElementId: LinearElementEditor["elementId"] | null;
|
||||
croppingElementId: AppState["croppingElementId"];
|
||||
};
|
||||
|
||||
export interface AppState {
|
||||
|
@ -386,6 +392,11 @@ export interface AppState {
|
|||
userToFollow: UserToFollow | null;
|
||||
/** the socket ids of the users following the current user */
|
||||
followedBy: Set<SocketId>;
|
||||
|
||||
/** image cropping */
|
||||
isCropping: boolean;
|
||||
croppingElementId: ExcalidrawElement["id"] | null;
|
||||
|
||||
searchMatches: readonly SearchMatch[];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue