Scale the text offset by the device's pixel ratio

Fixes #1918
This commit is contained in:
Frederic Junod
2014-03-28 12:22:10 +01:00
parent baab8dab63
commit e0278e0e9c
2 changed files with 6 additions and 4 deletions

View File

@@ -346,9 +346,9 @@ ol.render.canvas.Replay.prototype.replay_ = function(
goog.asserts.assert(goog.isString(instruction[3]));
text = /** @type {string} */ (instruction[3]);
goog.asserts.assert(goog.isNumber(instruction[4]));
var offsetX = /** @type {number} */ (instruction[4]);
var offsetX = /** @type {number} */ (instruction[4]) * pixelRatio;
goog.asserts.assert(goog.isNumber(instruction[5]));
var offsetY = /** @type {number} */ (instruction[5]);
var offsetY = /** @type {number} */ (instruction[5]) * pixelRatio;
goog.asserts.assert(goog.isNumber(instruction[6]));
rotation = /** @type {number} */ (instruction[6]);
goog.asserts.assert(goog.isNumber(instruction[7]));