Use new ol.style in ol.render.DragBox

This commit is contained in:
Éric Lemoine
2013-11-20 14:45:16 +01:00
parent cef2cac0d3
commit fd0ef8f238
+5 -4
View File
@@ -6,6 +6,7 @@ goog.require('goog.Disposable');
goog.require('goog.events'); goog.require('goog.events');
goog.require('ol.geom.Polygon'); goog.require('ol.geom.Polygon');
goog.require('ol.render.EventType'); goog.require('ol.render.EventType');
goog.require('ol.style.Fill');
goog.require('ol.style.Style'); goog.require('ol.style.Style');
@@ -45,15 +46,15 @@ ol.render.DragBox = function(opt_style) {
* @private * @private
* @type {ol.style.Style} * @type {ol.style.Style}
*/ */
this.style_ = goog.isDef(opt_style) ? opt_style : { this.style_ = goog.isDef(opt_style) ? opt_style : new ol.style.Style({
fill: { fill: new ol.style.Fill({
color: 'rgba(0,0,0,0.5)' color: 'rgba(0,0,0,0.5)'
}, }),
image: null, image: null,
stroke: null, stroke: null,
text: null, text: null,
zIndex: 0 zIndex: 0
}; });
}; };
goog.inherits(ol.render.DragBox, goog.Disposable); goog.inherits(ol.render.DragBox, goog.Disposable);