mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
parent
dd7aa29297
commit
7522c48453
1 changed files with 3 additions and 1 deletions
|
@ -83,7 +83,9 @@ export const shapesShortcutKeys = SHAPES.map((shape, index) => [
|
||||||
export function findShapeByKey(key: string) {
|
export function findShapeByKey(key: string) {
|
||||||
return (
|
return (
|
||||||
SHAPES.find((shape, index) => {
|
SHAPES.find((shape, index) => {
|
||||||
return shape.value[0] === key || key === (index + 1).toString();
|
return (
|
||||||
|
shape.value[0] === key.toLowerCase() || key === (index + 1).toString()
|
||||||
|
);
|
||||||
})?.value || "selection"
|
})?.value || "selection"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue