Fix zoom slider width for retina displays

This also simplifies the css by using a button for the slider, like for other
controls.
This commit is contained in:
Andreas Hocevar
2015-10-12 14:36:53 +02:00
parent c9c845394f
commit 61ce463cf9
3 changed files with 7 additions and 16 deletions

View File

@@ -79,8 +79,10 @@ ol.control.ZoomSlider = function(opt_options) {
this.duration_ = options.duration ? options.duration : 200;
var className = options.className ? options.className : 'ol-zoomslider';
var thumbElement = goog.dom.createDom(goog.dom.TagName.DIV,
[className + '-thumb', ol.css.CLASS_UNSELECTABLE]);
var thumbElement = goog.dom.createDom(goog.dom.TagName.BUTTON, {
'type': 'button',
'class': className + '-thumb ' + ol.css.CLASS_UNSELECTABLE
});
var containerElement = goog.dom.createDom(goog.dom.TagName.DIV,
[className, ol.css.CLASS_UNSELECTABLE, ol.css.CLASS_CONTROL],
thumbElement);