Allow user selection in overlay container
This commit is contained in:
committed by
Tim Schaub
parent
2b5d6536ca
commit
10aebb58d2
@@ -37,13 +37,18 @@
|
||||
.ol-viewport, .ol-unselectable {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
}
|
||||
|
||||
.ol-selectable {
|
||||
-webkit-touch-callout: default;
|
||||
-webkit-user-select: auto;
|
||||
-moz-user-select: auto;
|
||||
-ms-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
.ol-control {
|
||||
position: absolute;
|
||||
background-color: rgba(255,255,255,0.4);
|
||||
|
||||
@@ -10,6 +10,14 @@ goog.provide('ol.css');
|
||||
ol.css.CLASS_HIDDEN = 'ol-hidden';
|
||||
|
||||
|
||||
/**
|
||||
* The CSS class that we'll give the DOM elements to have them selectable.
|
||||
*
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
ol.css.CLASS_SELECTABLE = 'ol-selectable';
|
||||
|
||||
/**
|
||||
* The CSS class that we'll give the DOM elements to have them unselectable.
|
||||
*
|
||||
|
||||
@@ -4,6 +4,7 @@ goog.require('ol');
|
||||
goog.require('ol.MapEventType');
|
||||
goog.require('ol.Object');
|
||||
goog.require('ol.OverlayPositioning');
|
||||
goog.require('ol.css');
|
||||
goog.require('ol.dom');
|
||||
goog.require('ol.events');
|
||||
goog.require('ol.extent');
|
||||
@@ -58,7 +59,7 @@ ol.Overlay = function(options) {
|
||||
* @type {Element}
|
||||
*/
|
||||
this.element_ = document.createElement('DIV');
|
||||
this.element_.className = 'ol-overlay-container';
|
||||
this.element_.className = 'ol-overlay-container ' + ol.css.CLASS_SELECTABLE;
|
||||
this.element_.style.position = 'absolute';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user