Lines Matching refs:input

23222 	function inputHandler(manager, eventType, input) {  argument
23223 var pointersLen = input.pointers.length;
23224 var changedPointersLen = input.changedPointers.length;
23228 input.isFirst = !!isFirst;
23229 input.isFinal = !!isFinal;
23237 input.eventType = eventType;
23240 computeInputData(manager, input);
23243 manager.emit('hammer.input', input);
23245 manager.recognize(input);
23246 manager.session.prevInput = input;
23254 function computeInputData(manager, input) { argument
23256 var pointers = input.pointers;
23261 session.firstInput = simpleCloneInputData(input);
23266 session.firstMultiple = simpleCloneInputData(input);
23275 var center = input.center = getCenter(pointers);
23276 input.timeStamp = now();
23277 input.deltaTime = input.timeStamp - firstInput.timeStamp;
23279 input.angle = getAngle(offsetCenter, center);
23280 input.distance = getDistance(offsetCenter, center);
23282 computeDeltaXY(session, input);
23283 input.offsetDirection = getDirection(input.deltaX, input.deltaY);
23285 var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);
23286 input.overallVelocityX = overallVelocity.x;
23287 input.overallVelocityY = overallVelocity.y;
23288input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : ov…
23290 input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;
23291 input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;
23293 input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >
23294 session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);
23296 computeIntervalInputData(session, input);
23300 if (hasParent(input.srcEvent.target, target)) {
23301 target = input.srcEvent.target;
23303 input.target = target;
23306 function computeDeltaXY(session, input) { argument
23307 var center = input.center;
23312 if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {
23324 input.deltaX = prevDelta.x + (center.x - offset.x);
23325 input.deltaY = prevDelta.y + (center.y - offset.y);
23333 function computeIntervalInputData(session, input) { argument
23334 var last = session.lastInterval || input,
23335 deltaTime = input.timeStamp - last.timeStamp,
23338 …if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefine…
23339 var deltaX = input.deltaX - last.deltaX;
23340 var deltaY = input.deltaY - last.deltaY;
23348 session.lastInterval = input;
23357 input.velocity = velocity;
23358 input.velocityX = velocityX;
23359 input.velocityY = velocityY;
23360 input.direction = direction;
23368 function simpleCloneInputData(input) { argument
23373 while (i < input.pointers.length) {
23375 clientX: round(input.pointers[i].clientX),
23376 clientY: round(input.pointers[i].clientY)
23385 deltaX: input.deltaX,
23386 deltaY: input.deltaY
23981 preventDefaults: function(input) { argument
23982 var srcEvent = input.srcEvent;
23983 var direction = input.offsetDirection;
23999 var isTapPointer = input.pointers.length === 1;
24000 var isTapMovement = input.distance < 2;
24001 var isTapTouchTime = input.deltaTime < 250;
24250 emit: function(input) { argument
24255 self.manager.emit(event, input);
24265 if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)
24266 emit(input.additionalEvent);
24281 tryEmit: function(input) { argument
24283 return this.emit(input);
24436 attrTest: function(input) { argument
24438 return optionPointers === 0 || input.pointers.length === optionPointers;
24447 process: function(input) { argument
24449 var eventType = input.eventType;
24452 var isValid = this.attrTest(input);
24506 directionTest: function(input) { argument
24509 var distance = input.distance;
24510 var direction = input.direction;
24511 var x = input.deltaX;
24512 var y = input.deltaY;
24519 distance = Math.abs(input.deltaX);
24523 distance = Math.abs(input.deltaY);
24526 input.direction = direction;
24530 attrTest: function(input) { argument
24531 return AttrRecognizer.prototype.attrTest.call(this, input) && argument
24532 … (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));
24535 emit: function(input) { argument
24537 this.pX = input.deltaX;
24538 this.pY = input.deltaY;
24540 var direction = directionStr(input.direction);
24543 input.additionalEvent = this.options.event + direction;
24545 this._super.emit.call(this, input);
24574 attrTest: function(input) { argument
24575 return this._super.attrTest.call(this, input) &&
24576 (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);
24579 emit: function(input) { argument
24580 if (input.scale !== 1) {
24581 var inOut = input.scale < 1 ? 'in' : 'out';
24582 input.additionalEvent = this.options.event + inOut;
24584 this._super.emit.call(this, input);
24617 process: function(input) { argument
24619 var validPointers = input.pointers.length === options.pointers;
24620 var validMovement = input.distance < options.threshold;
24621 var validTime = input.deltaTime > options.time;
24623 this._input = input;
24627 …if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTim…
24629 } else if (input.eventType & INPUT_START) {
24635 } else if (input.eventType & INPUT_END) {
24645 emit: function(input) { argument
24650 if (input && (input.eventType & INPUT_END)) {
24651 this.manager.emit(this.options.event + 'up', input);
24684 attrTest: function(input) { argument
24685 return this._super.attrTest.call(this, input) &&
24686 (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);
24717 attrTest: function(input) { argument
24722 velocity = input.overallVelocity;
24724 velocity = input.overallVelocityX;
24726 velocity = input.overallVelocityY;
24729 return this._super.attrTest.call(this, input) &&
24730 direction & input.offsetDirection &&
24731 input.distance > this.options.threshold &&
24732 input.maxPointers == this.options.pointers &&
24733 abs(velocity) > this.options.velocity && input.eventType & INPUT_END;
24736 emit: function(input) { argument
24737 var direction = directionStr(input.offsetDirection);
24739 this.manager.emit(this.options.event + direction, input);
24742 this.manager.emit(this.options.event, input);
24788 process: function(input) { argument
24791 var validPointers = input.pointers.length === options.pointers;
24792 var validMovement = input.distance < options.threshold;
24793 var validTouchTime = input.deltaTime < options.time;
24797 if ((input.eventType & INPUT_START) && (this.count === 0)) {
24804 if (input.eventType != INPUT_END) {
24808 … var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;
24809 …var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshol…
24811 this.pTime = input.timeStamp;
24812 this.pCenter = input.center;
24820 this._input = input;
25010 this.input = createInputInstance(this);
25037 this.input.destroy();
25038 this.input.target = options.inputTarget;
25039 this.input.init();
25261 this.input.destroy();