]> source.dussan.org Git - jquery.git/commitdiff
Cleanup spacing in events.js. Fixes #10601
authorRick Waldron <waldron.rick@gmail.com>
Thu, 27 Oct 2011 19:31:35 +0000 (15:31 -0400)
committerRick Waldron <waldron.rick@gmail.com>
Thu, 27 Oct 2011 19:31:35 +0000 (15:31 -0400)
src/event.js

index 2171f4be472239a9c98764aa67000fa0ea0ea3fb..3576bffcada92c4ba5f8fc20b698748455a7e861 100644 (file)
@@ -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;