Merge pull request #6741 from fredj/overlay_select

Allow user selection in overlay container
This commit is contained in:
Frédéric Junod
2017-04-26 09:04:16 +02:00
committed by GitHub
3 changed files with 17 additions and 3 deletions

View File

@@ -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.
*

View File

@@ -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';
/**