Skip to content

Commit

Permalink
snap linewidth to pixel multiple
Browse files Browse the repository at this point in the history
  • Loading branch information
robx committed Mar 18, 2020
1 parent 5cbf6c5 commit 4022ff9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/puzzle/Graphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@
var gwdev = Math.max(1, Math.round(gw / pxSize));
this.gw = gwdev * pxSize;

var lwmin = this.lwmin / this.devicePixelRatio;
this.lw = Math.max(this.cw / this.lwratio, lwmin);
var lw = Math.max(this.cw / this.lwratio, this.lwmin);
var lwdev = Math.max(1, Math.round(lw / pxSize));
this.lw = lwdev * pxSize;
this.lm = this.lw / 2;
},
setOffset: function() {
Expand Down

0 comments on commit 4022ff9

Please sign in to comment.