From 0a20bca45063804dd714ada65cf37224cebd67a0 Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Tue, 11 Aug 2015 23:09:02 -0700 Subject: [PATCH] Retina support / honoring draw style --- web/app/sketcher/canvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/sketcher/canvas.js b/web/app/sketcher/canvas.js index 5b1ffc7a..ef114272 100644 --- a/web/app/sketcher/canvas.js +++ b/web/app/sketcher/canvas.js @@ -233,8 +233,8 @@ TCAD.TWO.Viewer.prototype.repaint = function() { for (var o = 0; o < layer.objects.length; o++) { var obj = layer.objects[o]; style = obj.style != null ? obj.style : layer.style; - if (style != prevStyle) TCAD.TWO.utils.setStyle(style, ctx, this.scale); - obj.draw(ctx, this.scale, this); + if (style != prevStyle) TCAD.TWO.utils.setStyle(style, ctx, this.scale / this.retinaPxielRatio); + obj.draw(ctx, this.scale / this.retinaPxielRatio, this); } } }