Removing unneeded preventDefault calls
This commit is contained in:
@@ -52,7 +52,6 @@ ol.interaction.AltDragRotate.prototype.handleDragStart =
|
|||||||
size.height / 2 - browserEvent.offsetY,
|
size.height / 2 - browserEvent.offsetY,
|
||||||
browserEvent.offsetX - size.width / 2);
|
browserEvent.offsetX - size.width / 2);
|
||||||
this.startRotation_ = (map.getRotation() || 0) + theta;
|
this.startRotation_ = (map.getRotation() || 0) + theta;
|
||||||
browserEvent.preventDefault();
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ ol.interaction.DragPan.prototype.handleDrag = function(mapBrowserEvent) {
|
|||||||
ol.interaction.DragPan.prototype.handleDragStart = function(mapBrowserEvent) {
|
ol.interaction.DragPan.prototype.handleDragStart = function(mapBrowserEvent) {
|
||||||
var browserEvent = mapBrowserEvent.browserEvent;
|
var browserEvent = mapBrowserEvent.browserEvent;
|
||||||
if (!browserEvent.shiftKey) {
|
if (!browserEvent.shiftKey) {
|
||||||
browserEvent.preventDefault();
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ ol.interaction.ShiftDragRotateAndZoom.prototype.handleDragStart =
|
|||||||
var theta = Math.atan2(delta.y, delta.x);
|
var theta = Math.atan2(delta.y, delta.x);
|
||||||
this.startRotation_ = (map.getRotation() || 0) + theta;
|
this.startRotation_ = (map.getRotation() || 0) + theta;
|
||||||
this.startRatio_ = resolution / delta.magnitude();
|
this.startRatio_ = resolution / delta.magnitude();
|
||||||
browserEvent.preventDefault();
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ ol.interaction.ShiftDragZoom.prototype.handleDragStart =
|
|||||||
if (browserEvent.isMouseActionButton() && browserEvent.shiftKey) {
|
if (browserEvent.isMouseActionButton() && browserEvent.shiftKey) {
|
||||||
this.dragBox_ =
|
this.dragBox_ =
|
||||||
new ol.control.DragBox(mapBrowserEvent.map, this.startCoordinate);
|
new ol.control.DragBox(mapBrowserEvent.map, this.startCoordinate);
|
||||||
browserEvent.preventDefault();
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -92,12 +92,6 @@ ol.renderer.Map = function(container, map) {
|
|||||||
this.handleSizeChanged, false, this)
|
this.handleSizeChanged, false, this)
|
||||||
];
|
];
|
||||||
|
|
||||||
var viewport = map.getViewport();
|
|
||||||
goog.events.listen(viewport, goog.events.EventType.MOUSEDOWN,
|
|
||||||
goog.events.Event.preventDefault);
|
|
||||||
goog.events.listen(viewport, goog.events.EventType.TOUCHSTART,
|
|
||||||
goog.events.Event.preventDefault);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.renderer.Map, goog.Disposable);
|
goog.inherits(ol.renderer.Map, goog.Disposable);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user