mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Fixed to touch gesture
This commit is contained in:
@@ -135,6 +135,7 @@ Blockly.TouchGesture.prototype.bindMouseEvents = function(e) {
|
||||
/*opt_noCaptureIdentifier*/ true);
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -143,7 +144,7 @@ Blockly.TouchGesture.prototype.bindMouseEvents = function(e) {
|
||||
* @package
|
||||
*/
|
||||
Blockly.TouchGesture.prototype.handleStart = function(e) {
|
||||
if (!this.isDragging) {
|
||||
if (this.isDragging()) {
|
||||
// A drag has already started, so this can no longer be a pinch-zoom.
|
||||
return;
|
||||
}
|
||||
@@ -238,8 +239,8 @@ Blockly.TouchGesture.prototype.handleTouchStart = function(e) {
|
||||
var point1 = this.cachedPoints_[pointers[1]];
|
||||
this.startDistance_ = goog.math.Coordinate.distance(point0, point1);
|
||||
this.isMultiTouch_ = true;
|
||||
e.preventDefault();
|
||||
}
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -272,8 +273,8 @@ Blockly.TouchGesture.prototype.handleTouchMove = function(e) {
|
||||
workspace.zoom(position.x, position.y, delta);
|
||||
}
|
||||
this.previousScale_ = scale;
|
||||
e.preventDefault();
|
||||
}
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user