Skip to content

Commit

Permalink
Fix map does not pan in Chrome 55 or Microsoft Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
marcobrt committed Dec 16, 2016
1 parent e23dd90 commit 5440711
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/OpenLayers/Events.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,12 +673,12 @@ OpenLayers.Events = OpenLayers.Class({
for (var i = 0, len = this.BROWSER_EVENTS.length; i < len; i++) {
type = this.BROWSER_EVENTS[i];
// register the event cross-browser
OpenLayers.Event.observe(element, type, this.eventHandler
);
if ((touchModel === this.TOUCH_MODEL_POINTER ||
touchModel === this.TOUCH_MODEL_MSPOINTER) &&
type.indexOf('touch') === 0) {
this.addPointerTouchListener(element, type, this.eventHandler);
} else {
OpenLayers.Event.observe(element, type, this.eventHandler);
}
}
// disable dragstart in IE so that mousedown/move/up works normally
Expand Down
3 changes: 2 additions & 1 deletion theme/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ div.olMap {
padding: 0 !important;
margin: 0 !important;
cursor: default;
-ms-touch-action: none;
touch-action: none;
}

div.olMapViewport {
text-align: left;
-ms-touch-action: none;
}

div.olLayerDiv {
Expand Down
4 changes: 1 addition & 3 deletions theme/default/style.mobile.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ div.olControlZoom a:hover {
background: rgba(0, 60, 136, 0.5);
}
}
div.olMapViewport {
-ms-touch-action: none;
}

.olLayerGrid .olTileImage {
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
Expand Down

0 comments on commit 5440711

Please sign in to comment.