Fixed CanvasRenderer regression + added unit test

This commit is contained in:
jdescottes
2014-12-21 18:56:40 +01:00
parent 123ea31191
commit 5cb1d0cd03
2 changed files with 43 additions and 3 deletions

View File

@@ -50,10 +50,11 @@
};
ns.CanvasRenderer.prototype.renderLine_ = function (color, x, y, width, context) {
if(color != Constants.TRANSPARENT_COLOR) {
context.fillStyle = color;
context.fillRect(x, y, 1, width);
if(color == Constants.TRANSPARENT_COLOR) {
color = this.transparentColor_;
}
context.fillStyle = color;
context.fillRect(x, y, 1, width);
};
ns.CanvasRenderer.prototype.createCanvas_ = function (zoom) {