Permalink
Browse files

Cleanup spacing in events.js. Fixes #10601

  • Loading branch information...
1 parent 0b4ac1d commit f0cf49fee2201718a56fe09d7a8be641f7775dc3 @rwaldron rwaldron committed Oct 27, 2011
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/event.js
View
@@ -81,7 +81,7 @@ jQuery.event = {
tns = rtypenamespace.exec( types[t] ) || [];
type = tns[1];
- namespaces = (tns[2] || "").split( "." ).sort();
+ namespaces = ( tns[2] || "" ).split( "." ).sort();
// If event changes its type, use the special event handlers for the changed type
special = jQuery.event.special[ type ] || {};
@@ -166,7 +166,7 @@ jQuery.event = {
}
// Once for each type.namespace in types; type may be omitted
- types = (types || "").replace( rhoverHack, "mouseover$1 mouseout$1" ).split(" ");
+ types = ( types || "" ).replace( rhoverHack, "mouseover$1 mouseout$1" ).split(" ");
for ( t = 0; t < types.length; t++ ) {
tns = rtypenamespace.exec( types[t] ) || [];
type = tns[1];
@@ -347,7 +347,7 @@ jQuery.event = {
cur = eventPath[i][0];
event.type = eventPath[i][1];
- handle = (jQuery._data( cur, "events" ) || {})[ event.type ] && jQuery._data( cur, "handle" );
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
if ( handle ) {
handle.apply( cur, data );
}
@@ -401,7 +401,7 @@ jQuery.event = {
// Make a writable jQuery.Event from the native event object
event = jQuery.event.fix( event || window.event );
- var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []),
+ var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
delegateCount = handlers.delegateCount,
args = [].slice.call( arguments, 0 ),
run_all = !event.exclusive && !event.namespace,
@@ -509,8 +509,8 @@ jQuery.event = {
doc = eventDoc.documentElement;
body = eventDoc.body;
- event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
- event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
}
// Add relatedTarget, if necessary
@@ -932,9 +932,9 @@ jQuery.fn.extend({
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
var handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
- handleObj.selector,
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
+ handleObj.selector,
handleObj.handler
);
return this;

0 comments on commit f0cf49f

Please sign in to comment.