@@ -10,7 +10,7 @@ own to make it easier to find related methods and events.
1010
1111## Extends
1212
13- * [ ` ViewportController ` ] ( ../Viewport/ViewportController.md ) .[ ` UiController ` ] ( ../UI/UiController.md ) .[ ` LayersController ` ] ( ../Layers/LayersController.md ) .[ ` ElementsController ` ] ( ../Elements/ElementsController.md ) .[ ` SelectionController ` ] ( ../Selection/SelectionController.md ) .[ ` InteractionsController ` ] ( ../Interactions/InteractionsController.md )
13+ * [ ` ViewportController ` ] ( ../Viewport/ViewportController.md ) .[ ` UiController ` ] ( ../UI/UiController.md ) .[ ` LayersController ` ] ( ../Layers/LayersController.md ) .[ ` ElementsController ` ] ( ../Elements/ElementsController.md ) .[ ` SelectionController ` ] ( ../Selection/SelectionController.md ) .[ ` InteractionsController ` ] ( ../Interactions/InteractionsController.md ) . [ ` ToolsController ` ] ( ../Tools/ToolsController.md )
1414
1515## Properties
1616
@@ -696,6 +696,151 @@ felt.clearSelection({ elements: true });
696696
697697***
698698
699+ ### setTool()
700+
701+ > ** setTool** (` tool ` : ` null ` | ` "note" ` | ` "pin" ` | ` "line" ` | ` "route" ` | ` "polygon" ` | ` "circle" ` | ` "marker" ` | ` "highlighter" ` | ` "text" ` | ` "link" ` ): ` void `
702+
703+ Sets the tool to use for drawing elements on the map.
704+
705+ #### Parameters
706+
707+ | Parameter | Type | Description |
708+ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
709+ | ` tool ` | ` null ` \| ` "note" ` \| ` "pin" ` \| ` "line" ` \| ` "route" ` \| ` "polygon" ` \| ` "circle" ` \| ` "marker" ` \| ` "highlighter" ` \| ` "text" ` \| ` "link" ` | The tool to set. |
710+
711+ #### Returns
712+
713+ ` void `
714+
715+ #### Example
716+
717+ ``` ts
718+ // Set the tool to "marker"
719+ felt .setTool (" marker" );
720+
721+ // put down the tool
722+ felt .setTool (null );
723+ ```
724+
725+ ***
726+
727+ ### getTool()
728+
729+ > ** getTool** (): ` Promise ` \< ` null ` | ` "note" ` | ` "pin" ` | ` "line" ` | ` "route" ` | ` "polygon" ` | ` "circle" ` | ` "marker" ` | ` "highlighter" ` | ` "text" ` | ` "link" ` >
730+
731+ Gets the current tool, if any is in use.
732+
733+ #### Returns
734+
735+ ` Promise ` \< ` null ` | ` "note" ` | ` "pin" ` | ` "line" ` | ` "route" ` | ` "polygon" ` | ` "circle" ` | ` "marker" ` | ` "highlighter" ` | ` "text" ` | ` "link" ` >
736+
737+ The current tool, or ` null ` if no tool is in use.
738+
739+ #### Example
740+
741+ ``` ts
742+ const tool = await felt .getTool (); // "marker", "polygon", etc.
743+ ```
744+
745+ ***
746+
747+ ### onToolChange()
748+
749+ > ** onToolChange** (` args ` : \{ ` handler ` : (` tool ` : ` null ` | ` "note" ` | ` "pin" ` | ` "line" ` | ` "route" ` | ` "polygon" ` | ` "circle" ` | ` "marker" ` | ` "highlighter" ` | ` "text" ` | ` "link" ` ) => ` void ` ; }): ` VoidFunction `
750+
751+ Listens for changes to the current tool.
752+
753+ #### Parameters
754+
755+ | Parameter | Type | Description |
756+ | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
757+ | ` args ` | \{ ` handler ` : (` tool ` : ` null ` \| ` "note" ` \| ` "pin" ` \| ` "line" ` \| ` "route" ` \| ` "polygon" ` \| ` "circle" ` \| ` "marker" ` \| ` "highlighter" ` \| ` "text" ` \| ` "link" ` ) => ` void ` ; } | - |
758+ | ` args.handler ` | (` tool ` : ` null ` \| ` "note" ` \| ` "pin" ` \| ` "line" ` \| ` "route" ` \| ` "polygon" ` \| ` "circle" ` \| ` "marker" ` \| ` "highlighter" ` \| ` "text" ` \| ` "link" ` ) => ` void ` | This callback is called with the current tool whenever the tool changes. |
759+
760+ #### Returns
761+
762+ ` VoidFunction `
763+
764+ A function to unsubscribe from the listener
765+
766+ #### Example
767+
768+ ``` ts
769+ const unsubscribe = felt .onToolChange ({
770+ handler : tool => console .log (tool ),
771+ });
772+
773+ // later on...
774+ unsubscribe ();
775+ ```
776+
777+ ***
778+
779+ ### setToolSettings()
780+
781+ > ** setToolSettings** (` settings ` : [ ` InputToolSettings ` ] ( ../Tools/InputToolSettings.md ) ): ` void `
782+
783+ Sets the settings for the current tool.
784+
785+ #### Parameters
786+
787+ | Parameter | Type | Description |
788+ | ---------- | ---------------------------------------------------- | -------------------- |
789+ | ` settings ` | [ ` InputToolSettings ` ] ( ../Tools/InputToolSettings.md ) | The settings to set. |
790+
791+ #### Returns
792+
793+ ` void `
794+
795+ ***
796+
797+ ### getToolSettings()
798+
799+ > ** getToolSettings** \< ` T ` >(` tool ` : ` T ` ): ` Promise ` \< [ ` ToolSettingsMap ` ] ( ../Tools/ToolSettingsMap.md ) \[ ` T ` ] >
800+
801+ Gets the settings for the current tool.
802+
803+ #### Type Parameters
804+
805+ | Type Parameter |
806+ | -------------------------------------------------------------------- |
807+ | ` T ` * extends* keyof [ ` ToolSettingsMap ` ] ( ../Tools/ToolSettingsMap.md ) |
808+
809+ #### Parameters
810+
811+ | Parameter | Type |
812+ | --------- | ---- |
813+ | ` tool ` | ` T ` |
814+
815+ #### Returns
816+
817+ ` Promise ` \< [ ` ToolSettingsMap ` ] ( ../Tools/ToolSettingsMap.md ) \[ ` T ` ] >
818+
819+ The settings for the current tool.
820+
821+ ***
822+
823+ ### onToolSettingsChange()
824+
825+ > ** onToolSettingsChange** (` args ` : \{ ` handler ` : (` settings ` : [ ` ToolSettingsChangeEvent ` ] ( ../Tools/ToolSettingsChangeEvent.md ) ) => ` void ` ; }): ` VoidFunction `
826+
827+ Listens for changes to the settings on all tools.
828+
829+ #### Parameters
830+
831+ | Parameter | Type |
832+ | -------------- | --------------------------------------------------------------------------------------------------------- |
833+ | ` args ` | \{ ` handler ` : (` settings ` : [ ` ToolSettingsChangeEvent ` ] ( ../Tools/ToolSettingsChangeEvent.md ) ) => ` void ` ; } |
834+ | ` args.handler ` | (` settings ` : [ ` ToolSettingsChangeEvent ` ] ( ../Tools/ToolSettingsChangeEvent.md ) ) => ` void ` |
835+
836+ #### Returns
837+
838+ ` VoidFunction `
839+
840+ A function to unsubscribe from the listener
841+
842+ ***
843+
699844### updateUiControls()
700845
701846> ** updateUiControls** (` controls ` : [ ` UiControlsOptions ` ] ( ../UI/UiControlsOptions.md ) ): ` void `
0 commit comments