Skip to content

Commit

Permalink
Small whoopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
Thulinma committed Mar 24, 2020
1 parent d66baf6 commit b2ab52f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/DrawingTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ class RenderTarget{
}else{
this.context.fillStyle = "#AAAAAA";
}
this.context.fillRect(x*this.zoom+this.zoom-1,y*this.zoom,(x%8==7)?2:1,this.zoom);
this.context.fillRect(x*this.zoom+this.zoom-((x%8==7)?2:1),y*this.zoom,(x%8==7)?2:1,this.zoom);
if (y == 15){
this.context.fillStyle = "#BB0000";
}else{
this.context.fillStyle = "#AAAAAA";
}
this.context.fillRect(x*this.zoom,y*this.zoom+this.zoom-1,this.zoom,(y%8==7)?2:1);
this.context.fillRect(x*this.zoom,y*this.zoom+this.zoom-((y%8==7)?2:1),this.zoom,(y%8==7)?2:1);
}
if (typeof this.opt.drawCallback == "function"){this.opt.drawCallback();}
}
Expand All @@ -75,15 +75,15 @@ class RenderTarget{
}else{
this.context.fillStyle = "#AAAAAA";
}
this.context.fillRect((x+1)*this.zoom-1,0,(x%8==7)?2:1,this.canvas.height);
this.context.fillRect((x+1)*this.zoom-((x%8==7)?2:1),0,(x%8==7)?2:1,this.canvas.height);
}
for (let y = 0; y < this.canvas.height/this.zoom; ++y){
if (y == 15){
this.context.fillStyle = "#BB0000";
}else{
this.context.fillStyle = "#AAAAAA";
}
this.context.fillRect(0,(y+1)*this.zoom-1,this.canvas.width,(y%8==7)?2:1);
this.context.fillRect(0,(y+1)*this.zoom-((y%8==7)?2:1),this.canvas.width,(y%8==7)?2:1);
}
}
if (typeof this.opt.drawCallback == "function"){this.opt.drawCallback();}
Expand Down

0 comments on commit b2ab52f

Please sign in to comment.