The ScreenMouseEvent. Document Object Model (DOM) Level 2 Events Specification The definition of 'MouseEvent.sceenX' in that specification. Working Draft: No change from Document Object Model (DOM) Level 2 Events Specification. Public static const RIGHT_MOUSE_UP: String = "rightMouseUp" The definition of 'MouseEvent.screenX' in that specification. Property of a rightMouseDown event object. The ScreenMouseEvent.RIGHT_MOUSE_DOWN constant defines the value of the type Public static const RIGHT_MOUSE_DOWN: String = "rightMouseDown" The ScreenMouseEvent.RIGHT_CLICK constant defines the value of the type Public static const RIGHT_CLICK: String = "rightClick" The ScreenMouseEvent.MOUSE_UP constant defines the value of the type Public static const MOUSE_UP: String = "mouseUp" The ScreenMouseEvent.MOUSE_DOWN constant defines the value of the type Public static const MOUSE_DOWN: String = "mouseDown" The SystemTrayIcon object under the pointing device. The vertical coordinate at which the event occurred in screen coordinates. The horizontal coordinate at which the event occurred in screen coordinates. True if the Ctrl or Control key is active false if it is inactive. True on the Mac if the Command key is active false if it is inactive. True if the Shift key is active false if it is inactive. The object that is actively processing the Event true on Mac if either the Ctrl key or the Command key is active. True on Windows or Linux if the Ctrl key is active. True if the primary mouse button is pressed false otherwise. This event has the following relevant properties: Property The ScreenMouseEvent.CLICK constant defines the value of the type Public static const CLICK: String = "click" ShiftKey: Boolean (default = false) - Set to true to indicate that the shift key was down when this event occured.īuttonDown: Boolean (default = false) - Set to true to indicate that a mouse button was down when this event occured.ĬommandKey: Boolean (default = false) - Indicates whether the Command key was down (Mac only).ĬontrolKey: Boolean (default = false) - Indicates whether the Ctrl or Control key was down. On Mac, indicates whether the Ctrl key or the Command key was down.ĪltKey: Boolean (default = false) - Set to true to indicate that the alt key was down when this event occured. ScreenY: Number (default = NaN) - Set to false since there is no default behavior to cancel.ĬtrlKey: Boolean (default = false) - On Windows or Linux, indicates whether the Ctrl key was down when this event occurred. ScreenX: Number (default = NaN) - Set to false since screen mouse events never bubble. Event listeners can access this informationīubbles: Boolean (default = false) - The X position of the click in screen coordinates.Ĭancelable: Boolean (default = false) - The Y position of the click in screen coordinates. Example: function ScreenMouseEvent(type: String, bubbles: Boolean = false, cancelable: Boolean = false, screenX: Number = NaN, screenY: Number = NaN, ctrlKey: Boolean = false, altKey: Boolean = false, shiftKey: Boolean = false, buttonDown: Boolean = false, commandKey: Boolean = false, controlKey: Boolean = false)Ĭreates a ScreenMouseEvent object that contains the mouse location in If you are not using jQuery's normalized events but still have access to the jQuery, you can use to normalize the event object. If you are doing event handling with jQuery, it will automatically normalize pageX and pageY for you. The only major browser that does not support these properties is IE8. Know that only clientX, clientY, screenX, and screenY are part of the W3C Spec. QuirksMode has a great compatibility table that details inconsistencies in the non-standard properties. If none of the ancestor elements have positioning, the mouse position is relative to the document (like pageX, pageY). Mouse position relative to the closest positioned ancestor element. x, yĮquivalent to clientX, clientY, but is unsupported by some browsers. Mouse position relative to the html document (i.e. This is implemented very inconsistently between browsers. Mouse position relative to the target element. Mouse position relative to the user's physical screen. Mouse position relative to the browser's visible viewport.
0 Comments
Leave a Reply. |