Skip to content

Commit

Permalink
Add pixel ratio to label cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Nov 30, 2017
1 parent 4e8714d commit d43f856
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ol/render/canvas/textreplay.js
Expand Up @@ -281,7 +281,7 @@ ol.render.canvas.TextReplay.prototype.drawText = function(geometry, feature) {
*/
ol.render.canvas.TextReplay.prototype.getImage = function(text, textKey, fillKey, strokeKey) {
var label;
var key = strokeKey + textKey + text + fillKey;
var key = strokeKey + textKey + this.pixelRatio + fillKey + text;

var labelCache = ol.render.canvas.labelCache;
if (!labelCache.containsKey(key)) {
Expand Down

0 comments on commit d43f856

Please sign in to comment.