new InteractionController( targetElement, camera, options ) → {InteractionController}

Description
Creates an interactionController
Parameters
Name Type Description
targetElement HTMLElement Dom element to attach event listeners
camera Camera Reference to the camera in use
options Object What callbacks should be registered

Members


isInteractive :boolean

Description
Should process interations

targetElement :HTMLElement

Description
Dom element to attach event listeners

targetDrawable :Drawable

Description
Drawable to hittest against for interactions

camera :Camera

Description
Camera reference

boundingRect :DOMRect

Description
Bounding rect of targetElement

onTapCB :function

Description
Function to call when tap is confirmed

<package> onMouseMoveCB :function

Description
Function to call when mousemove happens

options :Object

Description
What callbacks should be registered

target :Drawable

Description
sets targetDrawable

isOverTarget

Description
Checks to see if screen position is over targetDrawable
Parameters
Name Type Description
x number screen position x coordinate
y number screen position y coordinate
Returns

onPanStart

Description
First callback for pan interaction start
Parameters
Name Type Description
event Object Hammerjs event

onPanContinue

Description
First callback for a pan continue event
Parameters
Name Type Description
event Object Hammerjs event

onPanEnd

Description
First callback for end of pan event
Parameters
Name Type Description
event Object Hammerjs event

onTap

Description
First callback for tap event
Parameters
Name Type Description
event Object Hammerjs event

Methods


resize()

Description
Resize bounding rect and movement model

update()

Description
Updates internals for movement model