Prevent the default image dragging behavior in IE < 9
This commit is contained in:
@@ -159,6 +159,11 @@ a.ol-full-screen-true:after {
|
|||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||||
|
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.ol-viewport .ol-unselectable:not([ie8andbelow]) {
|
||||||
|
cursor: auto;
|
||||||
}
|
}
|
||||||
.ol-zoom {
|
.ol-zoom {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ goog.provide('ol.renderer.dom.Map');
|
|||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
goog.require('goog.dom');
|
goog.require('goog.dom');
|
||||||
goog.require('goog.dom.TagName');
|
goog.require('goog.dom.TagName');
|
||||||
|
goog.require('goog.functions');
|
||||||
goog.require('goog.style');
|
goog.require('goog.style');
|
||||||
|
goog.require('goog.userAgent');
|
||||||
goog.require('ol.css');
|
goog.require('ol.css');
|
||||||
goog.require('ol.layer.Image');
|
goog.require('ol.layer.Image');
|
||||||
goog.require('ol.layer.Tile');
|
goog.require('ol.layer.Tile');
|
||||||
@@ -36,6 +38,14 @@ ol.renderer.dom.Map = function(container, map) {
|
|||||||
style.width = '100%';
|
style.width = '100%';
|
||||||
style.height = '100%';
|
style.height = '100%';
|
||||||
|
|
||||||
|
// in IE < 9, we need to return false from ondragstart to cancel the default
|
||||||
|
// behavior of dragging images, which is interfering with the custom handler
|
||||||
|
// in the Drag interaction subclasses
|
||||||
|
if (goog.userAgent.IE && !goog.userAgent.isVersionOrHigher('9.0')) {
|
||||||
|
this.layersPane_.ondragstart = goog.functions.FALSE;
|
||||||
|
this.layersPane_.onselectstart = goog.functions.FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
goog.dom.insertChildAt(container, this.layersPane_, 0);
|
goog.dom.insertChildAt(container, this.layersPane_, 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user