- Legend to Symbols

-
Interface nokia.maps.dom.MouseEventTarget
This class is a virtual interface that does exist for documentation purposes. Each class implementing this interface delcares that it can act as the target for certain events. Each event in this interface (and therefore also within the classes implementing the interface) represents an event of a specific type.
The following example shows event handling for events of the type "click":
// Note that "obj" can be either a DOM node or any other JavaScript object.
var obj = nokia.maps.dom.EventTarget( {} );
obj.addListener("click", function (evt) {
console.log("This is the '"+evt.type+"' event!");
});
obj.dispatch( new nokia.maps.dom.Event({
type: "click"
});
The example creates an instant of nokia.maps.dom.EventTarget, adds a listener
for "click" events to it, and dispatches a "click" event to all registered listeners (in
this case one) - the listeners receive the object that represents the target of the event.
For more information about dispatching events, please refer to the documentation of the nokia.maps.dom.EventTarget.
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
The difference between the mouseenter and mouseleave events
compared to the mouseover and mouseout events is that there
can be multiple mouseenter events without even one mouseleave
event. This happens, for example, if you have a <div> with the size of 100 x 100
pixels that contains a centered image measuring 50 x 50 pixels. When the mouse cursor
enters the outer <div>, the <div> receives a mouseover and a
mouseenter event (note that the order is not guaranteed). However, if the
mouse cursor now moves over the image, the outer <div> receives a
mouseout event, because the mouse is no longer within its visual area,
and now the image gets a mouseover event. Additionally, the image receives
a mouseenter event, but the outer <div> does not get a mouseleave
event, because the mouse has not left the physical area of the outer <div>.
The mouseenter and mouseleave events are very useful, for example,
when building tooltips that are to apear below the mouse cursor or when showing overlay
information as long as the mouse cursor is above a specific area that contains child nodes.
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
The difference between the mouseenter and mouseleave events
compared to the mouseover and mouseout events is that there
can be multiple mouseenter events without even one mouseleave
event. This happens, for example, if you have a <div> with the size of 100 x 100
pixels that contains a centered image measuring 50 x 50 pixels. When the mouse cursor
enters the outer <div>, the <div> receives a mouseover and a
mouseenter event (note that the order is not guaranteed). However, if the
mouse cursor now moves over the image, the outer <div> receives a
mouseout event, because the mouse is no longer within its visual area,
and now the image gets a mouseover event. Additionally, the image receives
a mouseenter event, but the outer <div> does not get a mouseleave
event, because the mouse has not left the physical area of the outer <div>.
The mouseenter and mouseleave events are very useful, for example,
when building tooltips that are to apear below the mouse cursor or when showing overlay
information as long as the mouse cursor is above a specific area that contains child nodes.
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
| {nokia.maps.dom.MouseEvent} | evt | An object representing the event |
| {nokia.maps.dom.WheelEvent} | evt | An object representing the event |