ToolHandler

ToolHandler

superclass for all tool handlers

Constructor

new ToolHandler ()

Source:

Methods

endPosition (e)

Description:
  • note the mouse coordinates relative to the canvas

Source:
Parameters:
Name Type Description
e event

options () → {object}

Description:
  • return an object with the current canvas drawing options

Source:
Returns:
Type
object

optionsDialog (tool) → {HTMLElement}

Description:
  • create a dialog box to allow the user to choose options for the current shape sub classes fill the box with controls

Source:
Parameters:
Name Type Description
tool string
Returns:
Type
HTMLElement

panend ()

Description:
  • panend means the shape has been completed - add a marker to record that

Source:

panmove ()

Description:
  • do something as the mouse moves

Source:

panstart (e)

Description:
  • mouse has been pressed - note the starting mouse position and options

Source:
Parameters:
Name Type Description
e event