events.MouseWheelEvent Extends goog.events.BrowserEvent
A base class for mouse wheel events. This is used with the MouseWheelHandler.

Inheritance

Constructor

goog.events.MouseWheelEvent(detailbrowserEventdeltaXdeltaY)

Parameters

detail :
The number of rows the user scrolled.
browserEvent :
(Event | null)
Browser event object.
deltaX :
The number of rows the user scrolled in the X direction.
deltaY :
The number of rows the user scrolled in the Y direction.

Instance Methods

Public Protected Private
disposeInternal()
No description.
code »
getBrowserEvent()
(Event | null)
No description.
Returns: 
(Event | null)
  The underlying browser event object.
code »
init(eopt_currentTarget)
Accepts a browser event object and creates a patched, cross browser event object.
Arguments:
e :
(Event | null)
Browser event object.
opt_currentTarget :
(Node | null | undefined)
Current target for event.
code »
isButton(button)
Tests to see which button was pressed during the event. This is really only useful in IE and Gecko browsers. And in IE, it's only useful for mousedown/mouseup events, because click only fires for the left mouse button. Safari 2 only reports the left button being clicked, and uses the value '1' instead of 0. Opera only reports a mousedown event for the middle button, and no mouse events for the right button. Opera has default behavior for left and middle click that can only be overridden via a configuration setting. There's a nice table of this mess at http://www.unixpapa.com/js/mouse.html.
Arguments:
button :
goog.events.BrowserEvent.MouseButton.<number>
The button to test for.
Returns:   True if button was pressed.
code »
isMouseActionButton()
Whether this has an "action"-producing mouse button. By definition, this includes left-click on windows/linux, and left-click without the ctrl key on Macs.
Returns:   The result.
code »
preventDefault()
No description.
code »
stopPropagation()
No description.
code »
disposeInternal()
No description.
code »
preventDefault()
Prevents the default action, for example a link redirecting to a url.
code »
stopPropagation()
Stops event propagation.
code »
dispose()
undefined
Disposes of the object. If the object hasn&amp;#39;t already been disposed of, calls #disposeInternal. Classes that extend goog.Disposable should override #disposeInternal in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
Returns: 
undefined
  Nothing.
code »
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend goog.Disposable should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass&amp;#39; disposeInternal method. Everywhere else the public dispose method must be used. For example:
mypackage.MyClass = function() {
goog.base(this);
// Constructor logic specific to MyClass.
...
};
goog.inherits(mypackage.MyClass, goog.Disposable);

mypackage.MyClass.prototype.disposeInternal = function() {
goog.base(this, &#39;disposeInternal&#39;);
// Dispose logic specific to MyClass.
...
};
code »
getDisposed()
Use #isDisposed instead. No description.
Returns:   Whether the object has been disposed of.
code »
isDisposed()
No description.
Returns:   Whether the object has been disposed of.
code »
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed together.
Arguments:
disposable :
that will be disposed when this object is disposed.
code »

Instance Properties

deltaX :
The number of "lines" scrolled in the X direction. Note that not all browsers provide enough information to distinguish horizontal and vertical scroll events, so for these unsupported browsers, we will always have a deltaX of 0, even if the user scrolled their mouse wheel or trackpad sideways. Currently supported browsers are Webkit and Firefox 3.1 or later.
Code »
deltaY :
The number of lines scrolled in the Y direction.
Code »
detail :
The number of lines the user scrolled
Code »
altKey :
Whether alt was pressed at time of event.
Code »
button :
Which mouse button was pressed.
Code »
charCode :
Keycode of key press.
Code »
clientX :
X-coordinate relative to the window.
Code »
clientY :
Y-coordinate relative to the window.
Code »
ctrlKey :
Whether control was pressed at time of event.
Code »
currentTarget :
(Node | null | undefined)
Node that had the listener attached.
Code »
event_ :
(Event | null)
The browser event object.
Code »
keyCode :
Keycode of key press.
Code »
metaKey :
Whether the meta key was pressed at time of event.
Code »
offsetX :
X-coordinate relative to target.
Code »
offsetY :
Y-coordinate relative to target.
Code »
platformModifierKey :
Whether the default platform modifier key was pressed at time of event. (This is control for all platforms except Mac, where it's Meta.
Code »
relatedTarget :
(Node | null)
For mouseover and mouseout events, the related object for the event.
Code »
screenX :
X-coordinate relative to the monitor.
Code »
screenY :
Y-coordinate relative to the monitor.
Code »
shiftKey :
Whether shift was pressed at time of event.
Code »
state :
(Object | null)
History state object, only set for PopState events where it's a copy of the state object provided to pushState or replaceState.
Code »
target :
(Node | null)
Target that fired the event.
Code »
currentTarget :
(Object | null | undefined)
Object that had the listener attached.
Code »
propagationStopped_ :
Whether to cancel the event in internal capture/bubble processing for IE.
Code »
returnValue_ :
Return value for in internal capture/bubble processing for IE.
Code »
target :
(Object | null | undefined)
Target of the event.
Code »
type :
Event type.
Code »
dependentDisposables_ :
(Array | null)
Disposables that should be disposed when this object is disposed.
Code »
disposed_ :
Whether the object has been disposed of.
Code »

Package events

Package Reference