Skip to Content | Skip to Navigation


dojo/dom-geometry::normalizeEvent()

Project owner:Eugene Lazutkin
since:V1.7

normalizeEvent() normalizes the geometry of a DOM event. It normalizes the pageX, pageY, offsetX, offsetY, layerX and layerX properties of the event.

Usage

require(["dojo/dom-geomtry"], function(domGeom){
  domGeom.normalizeEvent(e);
  // e now has normalized geometry properties
});

Note: While dojo/_base/event::fix() will automatically normalize the geometry of an event, when dojo/on automatically normalizes DOM events, it does not do this (as it is expensive and not always necessary) and you will have to normalize these yourself.

See Also