Use constant for CSS class 'ol-unselectable'.

This commit is contained in:
Marc Jansen
2013-03-11 17:01:42 +01:00
parent 837aa7512b
commit 5e5e4d110a
7 changed files with 22 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.object');
goog.require('goog.style');
goog.require('ol');
goog.require('ol.Attribution');
goog.require('ol.FrameState');
goog.require('ol.MapEvent');
@@ -30,7 +31,7 @@ ol.control.Attribution = function(opt_options) {
this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);
var element = goog.dom.createDom(goog.dom.TagName.DIV, {
'class': 'ol-attribution ol-unselectable'
'class': 'ol-attribution ' + ol.CSS_CLASS_UNSELECTABLE
}, this.ulElement_);
goog.base(this, {

View File

@@ -3,6 +3,7 @@ goog.provide('ol.control.ScaleLineUnits');
goog.require('goog.dom');
goog.require('goog.style');
goog.require('ol');
goog.require('ol.FrameState');
goog.require('ol.MapEvent');
goog.require('ol.MapEventType');
@@ -48,7 +49,7 @@ ol.control.ScaleLine = function(opt_options) {
* @type {Element}
*/
this.element_ = goog.dom.createDom(goog.dom.TagName.DIV, {
'class': 'ol-scale-line ol-unselectable'
'class': 'ol-scale-line ' + ol.CSS_CLASS_UNSELECTABLE
}, this.innerElement_);
/**

View File

@@ -6,6 +6,7 @@ goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.events.EventType');
goog.require('ol');
goog.require('ol.control.Control');
@@ -43,8 +44,9 @@ ol.control.Zoom = function(opt_options) {
goog.events.EventType.CLICK
], this.handleOut_, false, this);
var element = goog.dom.createDom(
goog.dom.TagName.DIV, 'ol-zoom ol-unselectable', inElement, outElement);
var cssClasses = 'ol-zoom ' + ol.CSS_CLASS_UNSELECTABLE;
var element = goog.dom.createDom(goog.dom.TagName.DIV, cssClasses, inElement,
outElement);
goog.base(this, {
element: element,