examples/touch/main.js
function logHammerEvent(ev) {
		if(!ev.gesture) {
			return;
		}

		// store last event, that should might match the gremlin
		if(ev.gesture.eventType == 'end') {
			testLogger.lastEvent = ev;
		}

		// highlight gesture
		var event_el = getLogElement('gesture', ev.type);
		event_el.className = 'active';

		for(var i = 0, len = hammerProps.length; i < len; i++) {
			var prop = hammerProps[i];
			var value = ev.gesture[prop];
			switch(prop) {
				case 'center':
					value = value.pageX + 'x' + value.pageY;
					break;
				case 'gesture':
					value = ev.type;
					break;
				case 'target':
					value = ev.gesture.target.tagName;
					break;
				case 'touches':
					value = ev.gesture.touches.length;
					break;
			}
			getLogElement('prop', prop).innerHTML = value;
		}
	}
function logHammerEvent(ev) {
		if(!ev.gesture) {
			return;
		}

		// store last event, that should might match the gremlin
		if(ev.gesture.eventType == 'end') {
			testLogger.lastEvent = ev;
		}

		// highlight gesture
		var event_el = getLogElement('gesture', ev.type);
		event_el.className = 'active';

		for(var i = 0, len = hammerProps.length; i < len; i++) {
			var prop = hammerProps[i];
			var value = ev.gesture[prop];
			switch(prop) {
				case 'center':
					value = value.pageX + 'x' + value.pageY;
					break;
				case 'gesture':
					value = ev.type;
					break;
				case 'target':
					value = ev.gesture.target.tagName;
					break;
				case 'touches':
					value = ev.gesture.touches.length;
					break;
			}
			getLogElement('prop', prop).innerHTML = value;
		}
	}
function logHammerEvent ( ev ) { if ( ! ev . gesture ) { return ; } // store last event, that should might match the gremlin if ( ev . gesture . eventType == 'end' ) { testLogger . lastEvent = ev ; } // highlight gesture var event_el = getLogElement ( 'gesture' , ev . type ) ; event_el . className = 'active' ; for ( var i = 0 , len = hammerProps . length ; i < len ; i ++ ) { var prop = hammerProps [ i ] ; var value = ev . gesture [ prop ] ; switch ( prop ) { case 'center' : value = value . pageX + 'x' + value . pageY ; break ; case 'gesture' : value = ev . type ; break ; case 'target' : value = ev . gesture . target . tagName ; break ; case 'touches' : value = ev . gesture . touches . length ; break ; } getLogElement ( 'prop' , prop ) . innerHTML = value ; } }
highlight the triggered event and update the log values
@param ev
highlight the triggered event and update the log values