Handle pixelRatio on replay creation instead of replay
This commit is contained in:
@@ -142,7 +142,7 @@ ol.render.canvas.PolygonReplay.prototype.drawCircle = function(circleGeometry, f
|
||||
this.hitDetectionInstructions.push([
|
||||
ol.render.canvas.Instruction.SET_STROKE_STYLE,
|
||||
state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
|
||||
state.miterLimit, state.lineDash, state.lineDashOffset, true, 1
|
||||
state.miterLimit, state.lineDash, state.lineDashOffset
|
||||
]);
|
||||
}
|
||||
var flatCoordinates = circleGeometry.getFlatCoordinates();
|
||||
@@ -184,7 +184,7 @@ ol.render.canvas.PolygonReplay.prototype.drawPolygon = function(polygonGeometry,
|
||||
this.hitDetectionInstructions.push([
|
||||
ol.render.canvas.Instruction.SET_STROKE_STYLE,
|
||||
state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
|
||||
state.miterLimit, state.lineDash, state.lineDashOffset, true, 1
|
||||
state.miterLimit, state.lineDash, state.lineDashOffset
|
||||
]);
|
||||
}
|
||||
var ends = polygonGeometry.getEnds();
|
||||
@@ -216,7 +216,7 @@ ol.render.canvas.PolygonReplay.prototype.drawMultiPolygon = function(multiPolygo
|
||||
this.hitDetectionInstructions.push([
|
||||
ol.render.canvas.Instruction.SET_STROKE_STYLE,
|
||||
state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
|
||||
state.miterLimit, state.lineDash, state.lineDashOffset, true, 1
|
||||
state.miterLimit, state.lineDash, state.lineDashOffset
|
||||
]);
|
||||
}
|
||||
var endss = multiPolygonGeometry.getEndss();
|
||||
@@ -353,7 +353,8 @@ ol.render.canvas.PolygonReplay.prototype.setFillStrokeStyles_ = function(geometr
|
||||
state.currentMiterLimit != miterLimit) {
|
||||
this.instructions.push([
|
||||
ol.render.canvas.Instruction.SET_STROKE_STYLE,
|
||||
strokeStyle, lineWidth, lineCap, lineJoin, miterLimit, lineDash, lineDashOffset, true, 1
|
||||
strokeStyle, lineWidth * this.pixelRatio, lineCap, lineJoin, miterLimit,
|
||||
this.applyPixelRatio(lineDash), lineDashOffset * this.pixelRatio
|
||||
]);
|
||||
state.currentStrokeStyle = strokeStyle;
|
||||
state.currentLineCap = lineCap;
|
||||
|
||||
Reference in New Issue
Block a user