Try to disable refresh on overscroll in chrome

This commit is contained in:
2019-04-20 18:11:19 +02:00
parent ecb9ea25f7
commit 36dab80de8
3 changed files with 31 additions and 14 deletions

View File

@@ -59,6 +59,7 @@ Mouse.prototype = {
this.StartPosition.Y = position.Y;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
event.preventDefault();
},
OnMouseMove: function (event) {
if (this.RealDown === false) {
@@ -72,6 +73,7 @@ Mouse.prototype = {
this.Down = true;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
event.preventDefault();
},
OnMouseUp: function (event) {
var position = this.GetEventPoistion({
@@ -81,10 +83,12 @@ Mouse.prototype = {
this.RealDown = false;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
event.preventDefault();
},
OnMouseLeave: function () {
this.RealDown = false;
this.Down = false;
event.preventDefault();
},
OnTouchStart: function (event) {
var position = this.GetEventPoistion({
@@ -97,6 +101,7 @@ Mouse.prototype = {
this.StartPosition.Y = position.Y;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
event.preventDefault();
},
OnTouchMove: function (event) {
if (this.RealDown === false) {
@@ -110,9 +115,11 @@ Mouse.prototype = {
this.Down = true;
this.EndPosition.X = position.X;
this.EndPosition.Y = position.Y;
event.preventDefault();
},
OnTouchEnd: function () {
this.RealDown = false;
event.preventDefault();
},
Update: function () {
if (this.RealDown === false) {