/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_EventObject({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"

Files

Just as Ext.Element wraps around a native DOM node, Ext.EventObject\nwraps the browser's native event-object normalizing cross-browser differences,\nsuch as which mouse button is clicked, keys pressed, mechanisms to stop\nevent-propagation along with a method to prevent default actions from taking place.

\n\n

For example:

\n\n\n
function handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject\n    e.preventDefault();\n    var target = e.getTarget(); // same as t (the target HTMLElement)\n    ...\n}\nvar myDiv = Ext.get(\"myDiv\");  // get reference to an Ext.Element\nmyDiv.on(         // 'on' is shorthand for addListener\n    \"click\",      // perform an action on click of myDiv\n    handleClick   // reference to the action handler\n);\n// other methods to do the same:\nExt.EventManager.on(\"myDiv\", 'click', handleClick);\nExt.EventManager.addListener(\"myDiv\", 'click', handleClick);\n 
\n\n
Defined By

Methods

Ext.EventObject
view source
( ) : Number
Gets the character code for the event. ...

Gets the character code for the event.

\n

Returns

Ext.EventObject
view source
( ) : Number
Returns a normalized keyCode for the event. ...

Returns a normalized keyCode for the event.

\n

Returns

Ext.EventObject
view source
( ) : Number
Gets the x coordinate of the event. ...

Gets the x coordinate of the event.

\n

Returns

Ext.EventObject
view source
( ) : Number
Gets the y coordinate of the event. ...

Gets the y coordinate of the event.

\n

Returns

Ext.EventObject
view source
( ) : HTMLElement
Gets the related target. ...

Gets the related target.

\n

Returns

  • HTMLElement
    \n
Ext.EventObject
view source
( [selector], [maxDepth] ) : HTMLelement
Gets the target for the event. ...

Gets the target for the event.

\n

Parameters

  • selector : String (optional)

    A simple selector to filter the target or look for an ancestor of the target

    \n
  • maxDepth : Number/Mixed (optional)

    The max depth to

    \n\n
                search as a number or element (defaults to 10 || document.body)\n
    \n\n

    @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node

    \n

Returns

  • HTMLelement
    \n
Ext.EventObject
view source
( ) : Number
Normalizes mouse wheel delta across browsers ...

Normalizes mouse wheel delta across browsers

\n

Returns

Ext.EventObject
view source
( ) : Array
Gets the page coordinates of the event. ...

Gets the page coordinates of the event.

\n

Returns

  • Array

    The xy values like [x, y]

    \n
Ext.EventObject
view source
( )
Prevents the browsers default handling of the event. ...

Prevents the browsers default handling of the event.

\n
Ext.EventObject
view source
( e )private
...
\n

Parameters

  • e : Object
    \n
Ext.EventObject
view source
( )
Stop the event (preventDefault and stopPropagation) ...

Stop the event (preventDefault and stopPropagation)

\n
Ext.EventObject
view source
( )
Cancels bubbling of the event. ...

Cancels bubbling of the event.

\n
Ext.EventObject
view source
( [related], [allowEl] ) : Boolean
Returns true if the target of this event is a child of el. ...

Returns true if the target of this event is a child of el. Unless the allowEl parameter is set, it will return false if if the target is el.\nExample usage:

\n\n
        // Handle click on any child of an element\n        Ext.getBody().on('click', function(e){\n            if(e.within('some-el')){\n                alert('Clicked on a child of some-el!');\n            }\n        });\n\n        // Handle click directly on an element, ignoring clicks on child nodes\n        Ext.getBody().on('click', function(e,t){\n            if((t.id == 'some-el') && !e.within(t, true)){\n                alert('Clicked directly on some-el!');\n            }\n        });\n        
\n\n\n

@param {Mixed} el The id, DOM element or Ext.Element to check

\n

Parameters

  • related : Boolean (optional)

    true to test if the related target is within el instead of the target

    \n
  • allowEl : Boolean (optional)

    true to also check if the passed element is the target or related target

    \n

Returns

  • Boolean
    \n
","superclasses":[],"meta":{},"requires":[],"html_meta":{},"statics":{"property":[],"cfg":[],"css_var":[],"method":[],"event":[],"css_mixin":[]},"files":[{"href":"EventManager.html#Ext-EventObject","filename":"EventManager.js"}],"linenr":741,"members":{"property":[],"cfg":[],"css_var":[],"method":[{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"getCharCode","id":"method-getCharCode"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"getKey","id":"method-getKey"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"getPageX","id":"method-getPageX"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"getPageY","id":"method-getPageY"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"getRelatedTarget","id":"method-getRelatedTarget"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"getTarget","id":"method-getTarget"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"getWheelDelta","id":"method-getWheelDelta"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"getXY","id":"method-getXY"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"preventDefault","id":"method-preventDefault"},{"tagname":"method","owner":"Ext.EventObject","meta":{"private":true},"name":"setEvent","id":"method-setEvent"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"stopEvent","id":"method-stopEvent"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"stopPropagation","id":"method-stopPropagation"},{"tagname":"method","owner":"Ext.EventObject","meta":{},"name":"within","id":"method-within"}],"event":[],"css_mixin":[]},"inheritable":null,"private":null,"component":false,"name":"Ext.EventObject","singleton":true,"override":null,"inheritdoc":null,"id":"class-Ext.EventObject","mixins":[],"mixedInto":[]});