mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: Better legibility when editing some math elements.
This commit is contained in:
parent
089aaa8792
commit
b988f67759
3 changed files with 22 additions and 1 deletions
|
@ -220,6 +220,7 @@ export type SubtypeMethods = {
|
|||
"id" | "version" | "versionNonce"
|
||||
>,
|
||||
) => Omit<Partial<ExcalidrawElement>, "id" | "version" | "versionNonce">;
|
||||
getEditorStyle: (element: ExcalidrawTextElement) => Record<string, any>;
|
||||
ensureLoaded: (callback?: () => void) => Promise<void>;
|
||||
measureText: (
|
||||
element: Pick<
|
||||
|
@ -261,7 +262,9 @@ type MethodMap = { subtype: Subtype; methods: Partial<SubtypeMethods> };
|
|||
const methodMaps = [] as Array<MethodMap>;
|
||||
|
||||
// Use `getSubtypeMethods` to call subtype-specialized methods, like `render`.
|
||||
export const getSubtypeMethods = (subtype: Subtype | undefined) => {
|
||||
export const getSubtypeMethods = (
|
||||
subtype: Subtype | undefined,
|
||||
): Partial<SubtypeMethods> | undefined => {
|
||||
const map = methodMaps.find((method) => method.subtype === subtype);
|
||||
return map?.methods;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue