mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Merge branch 'master' into make-elements-immutable
This commit is contained in:
commit
88006ab426
7 changed files with 183 additions and 60 deletions
|
@ -21,6 +21,9 @@ export const hasStroke = (elements: ExcalidrawElement[]) =>
|
|||
element.type === "arrow")
|
||||
);
|
||||
|
||||
export const hasText = (elements: ExcalidrawElement[]) =>
|
||||
elements.some(element => element.isSelected && element.type === "text");
|
||||
|
||||
export function getElementAtPosition(
|
||||
elements: ExcalidrawElement[],
|
||||
x: number,
|
||||
|
|
|
@ -18,6 +18,7 @@ export {
|
|||
hasBackground,
|
||||
hasStroke,
|
||||
getElementAtPosition,
|
||||
getElementContainingPosition
|
||||
getElementContainingPosition,
|
||||
hasText
|
||||
} from "./comparisons";
|
||||
export { createScene } from "./createScene";
|
||||
|
|
|
@ -7,6 +7,11 @@ export type SceneState = {
|
|||
viewBackgroundColor: string | null;
|
||||
};
|
||||
|
||||
export type SceneScroll = {
|
||||
scrollX: number;
|
||||
scrollY: number;
|
||||
};
|
||||
|
||||
export interface Scene {
|
||||
elements: ExcalidrawTextElement[];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue