Apply fill and stroke only when set
This commit is contained in:
@@ -989,7 +989,9 @@ ol.render.canvas.Replay.prototype.applyStroke = function(state) {
|
|||||||
ol.render.canvas.Replay.prototype.updateFillStyle = function(state, applyFill, geometry) {
|
ol.render.canvas.Replay.prototype.updateFillStyle = function(state, applyFill, geometry) {
|
||||||
var fillStyle = state.fillStyle;
|
var fillStyle = state.fillStyle;
|
||||||
if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {
|
if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {
|
||||||
|
if (fillStyle !== undefined) {
|
||||||
applyFill.call(this, state, geometry);
|
applyFill.call(this, state, geometry);
|
||||||
|
}
|
||||||
state.currentFillStyle = fillStyle;
|
state.currentFillStyle = fillStyle;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1014,7 +1016,9 @@ ol.render.canvas.Replay.prototype.updateStrokeStyle = function(state, applyStrok
|
|||||||
state.currentLineJoin != lineJoin ||
|
state.currentLineJoin != lineJoin ||
|
||||||
state.currentLineWidth != lineWidth ||
|
state.currentLineWidth != lineWidth ||
|
||||||
state.currentMiterLimit != miterLimit) {
|
state.currentMiterLimit != miterLimit) {
|
||||||
|
if (strokeStyle !== undefined) {
|
||||||
applyStroke.call(this, state);
|
applyStroke.call(this, state);
|
||||||
|
}
|
||||||
state.currentStrokeStyle = strokeStyle;
|
state.currentStrokeStyle = strokeStyle;
|
||||||
state.currentLineCap = lineCap;
|
state.currentLineCap = lineCap;
|
||||||
state.currentLineDash = lineDash;
|
state.currentLineDash = lineDash;
|
||||||
|
|||||||
Reference in New Issue
Block a user