mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Update jquery.datetimepicker.js
This commit is contained in:
parent
1956c8b4ba
commit
d443bae502
@ -1060,11 +1060,12 @@ var datetimepickerFactory = function ($) {
|
|||||||
|
|
||||||
var handleTouchMoved = function (event) {
|
var handleTouchMoved = function (event) {
|
||||||
var evt = event.originalEvent;
|
var evt = event.originalEvent;
|
||||||
this.touchStartPosition = this.touchStartPosition || evt.touches[0]
|
var position = evt.touches ? evt.touches[0] : evt;
|
||||||
var touchPosition = evt.touches[0]
|
this.touchStartPosition = this.touchStartPosition || position;
|
||||||
var xMovement = Math.abs(this.touchStartPosition.clientX - touchPosition.clientX)
|
var touchPosition = position;
|
||||||
var yMovement = Math.abs(this.touchStartPosition.clientY - touchPosition.clientY)
|
var xMovement = Math.abs(this.touchStartPosition.clientX - touchPosition.clientX);
|
||||||
var distance = Math.sqrt(xMovement * xMovement + yMovement * yMovement)
|
var yMovement = Math.abs(this.touchStartPosition.clientY - touchPosition.clientY);
|
||||||
|
var distance = Math.sqrt(xMovement * xMovement + yMovement * yMovement);
|
||||||
if(distance > options.touchMovedThreshold) {
|
if(distance > options.touchMovedThreshold) {
|
||||||
this.touchMoved = true;
|
this.touchMoved = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user