Set default canvas lineJoin and lineCap to 'round'

This commit is contained in:
Frederic Junod
2013-12-19 15:40:31 +01:00
parent 491482870b
commit 06ba19896c
3 changed files with 4 additions and 6 deletions
-2
View File
@@ -39,8 +39,6 @@ var styleFunction = function(feature, resolution) {
styleArray = [new ol.style.Style({ styleArray = [new ol.style.Style({
stroke: new ol.style.Stroke({ stroke: new ol.style.Stroke({
color: color, color: color,
lineCap: 'round',
lineJoin: 'round',
width: 3 width: 3
}) })
})]; })];
+2 -2
View File
@@ -743,8 +743,8 @@
/** /**
* @typedef {Object} olx.style.StrokeOptions * @typedef {Object} olx.style.StrokeOptions
* @property {ol.Color|string|undefined} color Color. * @property {ol.Color|string|undefined} color Color.
* @property {string|undefined} lineCap Line cap style: `butt`, `round`, or `square`. Default is `butt`. * @property {string|undefined} lineCap Line cap style: `butt`, `round`, or `square`. Default is `round`.
* @property {string|undefined} lineJoin Line join style: `bevel`, `round`, or `miter`. Default is `miter`. * @property {string|undefined} lineJoin Line join style: `bevel`, `round`, or `miter`. Default is `round`.
* @property {Array.<number>|undefined} lineDash Line dash pattern. Default is `undefined` (no dash). * @property {Array.<number>|undefined} lineDash Line dash pattern. Default is `undefined` (no dash).
* @property {number|undefined} miterLimit Miter limit. Default is `10`. * @property {number|undefined} miterLimit Miter limit. Default is `10`.
* @property {number|undefined} width Width. * @property {number|undefined} width Width.
+2 -2
View File
@@ -18,7 +18,7 @@ ol.render.canvas.defaultFillStyle = ol.color.fromString('black');
/** /**
* @const {string} * @const {string}
*/ */
ol.render.canvas.defaultLineCap = 'butt'; ol.render.canvas.defaultLineCap = 'round';
/** /**
@@ -30,7 +30,7 @@ ol.render.canvas.defaultLineDash = [];
/** /**
* @const {string} * @const {string}
*/ */
ol.render.canvas.defaultLineJoin = 'miter'; ol.render.canvas.defaultLineJoin = 'round';
/** /**