|
ka-Map | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--kaTool
kaTool API.
An API for building tools that work with kaMap.
To create a new tool, you need to have included this file first. Next
create a function to instantiate your new tool. All object construction
functions must include a parameter that references the kaMap object on which
they operate.
The object construction function must call the kaTool constructor using the
following syntax:
kaTool.apply( this, [oKaMap] );
where oKaMap is the name of the parameter to the constructor function.
You should then set the tool's name (this.name) and overload any functions
for mouse handling etc.
Defined in kaTool.js
Field Summary | |
Object |
kaMap
the instance of kaMap on which this tool operates |
Object |
name
the name of this tool |
Constructor Summary | |
kaTool
( <Object> oKaMap )
|
Method Summary | |
void
|
activate()
activate this tool. |
Array
|
adjustPixPosition( <Integer> x, <Integer> y )
adjust a page-relative pixel position into a kaMap relative pixel position |
Object
|
cancelEvent(<Event> e)
provide a cross-platform method of cancelling events, including stopping of event bubbling and propagation. |
void
|
deactivate()
deactivate this tool. |
Object
|
ondblclick(<Event> e)
handle mouse doubleclicks on the viewport of the kaMap. |
Object
|
onkeypress(<Event> e)
handle keypress events. |
Object
|
onmousedown(<Event> e)
handle mouse down events on the viewport of the kaMap. |
Object
|
onmousemove(<Event> e)
handle mouse movement over the viewport of the kaMap. |
Object
|
onmouseout(<Event> e)
handle the mouse leaving the kaMap viewport. |
Object
|
onmouseover(<Event> e)
handle the mouse moving over the kaMap viewport. |
Object
|
onmouseup(<Event> e)
handle mouse up events on the viewport of the kaMap. |
void
|
onmousewheel(<Event> e)
handle mouse wheel events over the viewport of the kaMap. |
Field Detail |
Object kaMap
Object name
Constructor Detail |
kaTool( <Object> oKaMap )
oKaMap
- the instance of kaMap on which this tool should operate
Method Detail |
void activate()
Array adjustPixPosition( <Integer> x, <Integer> y )
x
- the x page coordinate to convert
y
- the y page coordinate to convert
Object cancelEvent(<Event> e)
e
- the event to cancel
void deactivate()
Object ondblclick(<Event> e)
e
- the mouse event object
Object onkeypress(<Event> e)
e
- the keypress event object
Object onmousedown(<Event> e)
e
- the mouse event object
Object onmousemove(<Event> e)
e
- the mouse event object
Object onmouseout(<Event> e)
e
- the mouse event
Object onmouseover(<Event> e)
e
- the mouse event
Object onmouseup(<Event> e)
e
- the mouse event object
void onmousewheel(<Event> e)
e
- the mouse event object
|
ka-Map | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |