Tool State

Returns a ToolState describing the state of a target tool.

Syntax

function getToolState(state, toolId) {
  return state.toolState[toolId];
}

Parameters

toolId

The id of the target tool. A full list of available tool ids can be found here.

Examples

Returns the state of the select tool.

getToolState(
  store.getState(),
  "SELECT_TOOL"
)