Add style option to DragBox interaction
This commit is contained in:
committed by
Antoine Abt
parent
18f9eeab12
commit
eb840777e8
@@ -318,6 +318,7 @@
|
|||||||
* @property {ol.events.ConditionType|undefined} condition A conditional
|
* @property {ol.events.ConditionType|undefined} condition A conditional
|
||||||
* modifier (i.e. Shift key) that determines if the interaction is active
|
* modifier (i.e. Shift key) that determines if the interaction is active
|
||||||
* or not, default is always.
|
* or not, default is always.
|
||||||
|
* @property {ol.style.Style} style Style for the box.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -44,11 +44,18 @@ ol.interaction.DragBox = function(opt_options) {
|
|||||||
this.behavior_ = goog.isDef(options.behavior) ?
|
this.behavior_ = goog.isDef(options.behavior) ?
|
||||||
options.behavior : goog.nullFunction;
|
options.behavior : goog.nullFunction;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @type {ol.style.Style}
|
||||||
|
*/
|
||||||
|
var style = goog.isDef(options.style) ? options.style : null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {ol.render.Box}
|
* @type {ol.render.Box}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.box_ = new ol.render.Box();
|
this.box_ = new ol.render.Box(style);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
|||||||
Reference in New Issue
Block a user