File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ const SHAPES: ShapeProps[] = [
3737 } ,
3838 {
3939 icon : TriangleIcon ,
40- title : 'Triangle — T ' ,
40+ title : 'Triangle' ,
4141 pointer : BasicShapes . triangle ,
4242 } ,
4343 {
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export const BUTTONS: AppToolButtonProps[] = [
7979 {
8080 icon : TextIcon ,
8181 pointer : BasicShapes . text ,
82- title : 'Text' ,
82+ title : 'Text — T ' ,
8383 } ,
8484 {
8585 icon : FeltTipPenIcon ,
Original file line number Diff line number Diff line change @@ -70,9 +70,13 @@ export const buildDrawnixHotkeyPlugin = (
7070 const keyToPointer = {
7171 r : BasicShapes . rectangle ,
7272 o : BasicShapes . ellipse ,
73- t : BasicShapes . triangle ,
73+ t : BasicShapes . text ,
7474 } ;
75- setCreationMode ( board , BoardCreationMode . drawing ) ;
75+ if ( keyToPointer [ event . key ] === BasicShapes . text ) {
76+ setCreationMode ( board , BoardCreationMode . dnd ) ;
77+ } else {
78+ setCreationMode ( board , BoardCreationMode . drawing ) ;
79+ }
7680 BoardTransforms . updatePointerType ( board , keyToPointer [ event . key ] ) ;
7781 updateAppState ( { pointer : keyToPointer [ event . key ] } ) ;
7882 }
You can’t perform that action at this time.
0 commit comments