Nokia Maps API Reference

Contents

Interface nokia.maps.dom.MouseEvent

Interface Summary

This class represents all mouse-related events.

Note that this class represents an unimplemented interface. It is included here to document its properties. The class is derived from nokia.maps.dom.Event, but, in addition to the properties of the parent class, it has the properties described here.

Field Summary
Number AT_TARGET This field is an event phase identifier, indicating the target phase, which means it is being evaluated at the event target.
Number BUBBLING_PHASE This field is an event phase identifier, indicating the bubbling phase.
Number CAPTURING_PHASE This field is an event phase identifier, indicating the capture phase.
Number PROPAGATION_OK This field is an identifier, indicating that the propagation of the event has not been stopped.
Number PROPAGATION_STOP This field is an identifier, indicating that the propagation of the event has been stopped.
Number PROPAGATION_STOP_IMMEDIATE This field is an identifier, indicating that the propagation of the event has been stopped with immediate effect.
Boolean altKey This field indicates the activation state of the modifier key Alt.
Boolean bubbles This property indicates whether the event is a bubbling event (true) or not (false).
Number button This property holds the numeric id of a mouse button that has changed state, because it was pressed or released.
Number buttonState This property holds the current state of all mouse buttons.
Boolean canBubble This property indicates whether the event can bubble (true) or not (false).
Boolean canSicker This property indicates whether the event can sicker (whether in the capture phase, listeners can be iterated from the top down) or not.
Boolean cancelable This property indicates whether or not an event can have its default action canceled (prevented).
Number clientX The horizontal coordinate at which the event occurred relative to the viewport associated with the event.
Number clientY The vertical coordinate at which the event occurred relative to the viewport associated with the event.
Boolean ctrlKey This field indicates the activation state of the modifier key Ctrl.
nokia.maps.dom.EventTarget currentTarget This property indicates the object whose eventListeners are currently being processed.
Boolean defaultPrevented This property indicates whether preventDefault() has been called for this event.
Number eventPhase This property indicates the phase in the event flow the given event has reached.
Boolean getModifierState This method queries the state of a modifier on the basis of the key identifier supplied by the caller.
Boolean metaKey This field indicates the activation state of the modifier key Meta.
String namespaceURI This property holds the namespace URI associated with the event or null if it is unspecified.
Event nativeEvent This property holds a reference to the native DOM event on which the given normalized event object is based.
nokia.maps.dom.Page page This property holds a reference to the page to which the given event relates.
Number pageX The horizontal coordinate at which the event occurred relative to the document associated with the event.
Number pageY The vertical coordinate at which the event occurred relative to the document associated with the event.
Number propagation This property indicates the status of event propagation.
nokia.maps.dom.EventTarget relatedTarget This property identifies a secondary event target related to a UI event, depending on the type of event:

  • mouseover event - the property refers to the target over which the mouse pointer or finger is has begun to pass or has passed, if available
  • mouseout event - the property contains the reference to the target which the mouse is leaving, if available
  • drag event - the property refers to the target that located below the mouse pointer or finger, if available
  • dragenter, dragleave or drop event - the property contains the reference to the event target that is currently being dragged (in other words, the target of the dragstart event)
  • dragend event - the property refers to the event target on which the dragged object has been dropped successfully; if the drop failed for any reason the property is null

Therefore, this property only holds information relevant for mouseover, mouseout, drag, dragenter, dragleave, drop or dragend events; otherwise it is null.

Number screenX The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.
Number screenY The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.
Boolean shiftKey This field indicates the activation state of the modifier key Shift.
nokia.maps.dom.EventTarget target This property holds the target object of the event.
Number targetX The x-position of the cursor relative to the target.
Number targetY The y-position of the cursor relative to the target.
Number timeStamp This property specifies the time at which the event was created in milliseconds relative to 1970-01-01T00:00:00Z.
String type This property holds the local name of the event type.
Field Detail
Boolean altKey
This field indicates the activation state of the modifier key Alt. It is set to true if the modifier is activated.
Number button
This property holds the numeric id of a mouse button that has changed state, because it was pressed or released.
  • 0 - indicates the normal button of the mouse that is used to click on user interface buttons and menu items or to select text (in general this is the left mouse button or the one button on a Macintosh mouse)
  • 2 - indicates the contextual property button of the mouse if present (normally, this means the right mouse button that is used to display a context menu)
  • 1 - indicates the extra button (typically, the middle button, which is often combined with the mouse wheel)
  • values higher than 2 - indicate other mouse buttons that may be present or simulated on some mouse devices
Number buttonState
This property holds the current state of all mouse buttons.

This property is a bitmask where bit zero represents the state of the left mouse button, bit one the state of the middle mouse button, bit two the state of the right mouse button and bit three and higher the state of any further mouse buttons that may be present or simulated. This state is set for all events. You can detect if a specific button has been pressed, like this: if (event.buttonState & (1 << button)) ..., where button is the identifier as defined by the W3C (zero for the left button, one for the middle button, two for the right button and three, etc. for further buttons).

Note that within a "mouseup" event, the value of this property is up-to-date. For example, while the button property may be set to 1 to indicate that the middle button has been released, bit one in the buttonState property is already cleared as the button has already been released.

This is a proprietary member and not part of the W3C interface specification this class implements.

Number clientX
The horizontal coordinate at which the event occurred relative to the viewport associated with the event.
Number clientY
The vertical coordinate at which the event occurred relative to the viewport associated with the event.
Boolean ctrlKey
This field indicates the activation state of the modifier key Ctrl. It is set to true if the modifier is activated.
Boolean getModifierState
This method queries the state of a modifier on the basis of the key identifier supplied by the caller.
Boolean metaKey
This field indicates the activation state of the modifier key Meta. It is set to true if the modifier is activated.
Number pageX
The horizontal coordinate at which the event occurred relative to the document associated with the event.

This is a proprietary member and not part of the W3C interface specification this class implements.

Number pageY
The vertical coordinate at which the event occurred relative to the document associated with the event.

This is a proprietary member and not part of the W3C interface specification this class implements.

This property identifies a secondary event target related to a UI event, depending on the type of event:

  • mouseover event - the property refers to the target over which the mouse pointer or finger is has begun to pass or has passed, if available
  • mouseout event - the property contains the reference to the target which the mouse is leaving, if available
  • drag event - the property refers to the target that located below the mouse pointer or finger, if available
  • dragenter, dragleave or drop event - the property contains the reference to the event target that is currently being dragged (in other words, the target of the dragstart event)
  • dragend event - the property refers to the event target on which the dragged object has been dropped successfully; if the drop failed for any reason the property is null

Therefore, this property only holds information relevant for mouseover, mouseout, drag, dragenter, dragleave, drop or dragend events; otherwise it is null.

Note that in a drag operation the property reltatedTarget always contains the necessary counterpart of the event, but only for simulated events, not for native drag events.

Number screenX
The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.
Number screenY
The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.
Boolean shiftKey
This field indicates the activation state of the modifier key Shift. It is set to true if the modifier is activated.
Number targetX
The x-position of the cursor relative to the target.

This is a proprietary member and not part of the W3C interface specification this class implements.

Number targetY
The y-position of the cursor relative to the target.

This is a proprietary member and not part of the W3C interface specification this class implements.

Documentation generated on Thu Dec 15 2011 15:14:28 GMT+0100 (CET).