Maps API for JavaScript Developer's Guide

H.mapevents.WheelEvent

Class Summary

Extends: H.util.Event

This class represents an event fired when the mouse wheel is turned, with the mouse pointer on the map. It contains information about the cursor position and the map object directly under the mouse pointer.

[ For full details, see the Class Details ]

Property Summary

Table 1. Properties
Properties

delta : {number}

This property holds a value indicating the wheel move delta.

viewportX : {number}

This property holds a value indicating map viewport x-position.

viewportY : {number}

This property holds a value indicating map viewport y-position.

target : {(H.map.Object | H.Map)}

This property holds the target for the event.

originalEvent : {Event}

This property holds the original mouse wheel event object.

currentTarget : {(H.map.Object | H.Map)}

This property holds an object with an attached listener.

type : {string}

This property holds the name of the dispatched event.

defaultPrevented : {boolean}

This property holds a value indicating if preventDefault() was called on the current event.

Method Summary

Table 2. Methods
Methods

preventDefault ()

This method sets the value of the property defaultPrevented. The property can be used to prevent default behavior associated with the given event.

stopPropagation ()

This method stops the propagation of the current event.

Class Description

This class represents an event fired when the mouse wheel is turned, with the mouse pointer on the map. It contains information about the cursor position and the map object directly under the mouse pointer.

Constructor Details

H.mapevents.WheelEvent(deltaY, viewportX, viewportY, target, originalEvent)

Parameters:
 
deltaY:
{number}
 
The wheel move delta on the y-axis
viewportX:
{number}
 
The x-coordinate of the event in the viewport
viewportY:
{number}
 
The y-coordinate of the event in the viewport
target:
{(H.Map | H.map.Object)}
 
The target element of the event
originalEvent:
{Event}
 
An object representing the original event

Property Details

delta: {number}

This property holds a value indicating the wheel move delta.

viewportX: {number}

This property holds a value indicating map viewport x-position.

viewportY: {number}

This property holds a value indicating map viewport y-position.

target: {(H.map.Object | H.Map)}

This property holds the target for the event.

originalEvent: {Event}

This property holds the original mouse wheel event object.

currentTarget: {(H.map.Object | H.Map)}

This property holds an object with an attached listener.

type: {string}

This property holds the name of the dispatched event.

defaultPrevented: {boolean}

This property holds a value indicating if preventDefault() was called on the current event.

Method Details

preventDefault ()

This method sets the value of the property defaultPrevented. The property can be used to prevent default behavior associated with the given event.

stopPropagation ()

This method stops the propagation of the current event.