Add getters to ol.style.Stroke

This commit is contained in:
Éric Lemoine
2013-12-19 13:19:51 +01:00
parent 5cd3ab06fc
commit d4d9cb6a3a
4 changed files with 118 additions and 44 deletions
+4 -2
View File
@@ -131,8 +131,10 @@ ol.style.Circle.prototype.render_ = function() {
context.fill();
}
if (!goog.isNull(this.stroke_)) {
context.strokeStyle = ol.color.asString(this.stroke_.color);
context.lineWidth = goog.isDef(this.stroke_.width) ? this.stroke_.width : 1;
var strokeColor = this.stroke_.getColor();
context.strokeStyle = ol.color.asString(strokeColor);
var strokeWidth = this.stroke_.getWidth();
context.lineWidth = goog.isDef(strokeWidth) ? strokeWidth : 1;
context.stroke();
}