Fixed bug in canvas renderer

This commit is contained in:
dbroqua 2018-07-29 18:06:55 +02:00
parent 190bc1547f
commit 4b4a5e9126
3 changed files with 4 additions and 4 deletions

BIN
public/jante-face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
public/jante-profil.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -286,7 +286,7 @@ class Results extends Component {
var actuel_tyre_largeur=Number(this.state.oldTyreWidth); var actuel_tyre_largeur=Number(this.state.oldTyreWidth);
var nouveau_jante_largeur=Number(this.state.newWheelWidth); var nouveau_jante_largeur=Number(this.state.newWheelWidth);
var nouveau_jante_ET=Number(this.state.newWheelET); var nouveau_jante_ET=Number(this.state.newWheelET);
var nouveau_tyre_largeur=Number(this.state.newWheelWidth); var nouveau_tyre_largeur=Number(this.state.newTyreWidth);
ctx.clearRect(0,0,c.width,c.height); ctx.clearRect(0,0,c.width,c.height);
ctx.beginPath(); ctx.beginPath();
@ -454,9 +454,9 @@ class Results extends Component {
ctx.beginPath(); ctx.beginPath();
ctx.moveTo((XmoyeuNew-rebordInterneNew),YNew-demiRimNew); ctx.moveTo((XmoyeuNew-rebordInterneNew),YNew-demiRimNew);
ctx.lineTo((XmoyeuNew-rebordInterneNew+ETPneuNew*scalling),(YNew-demiRimNew-Y*scalling)); ctx.lineTo((XmoyeuNew-rebordInterneNew+ETPneuNew*scalling),(YNew-demiRimNew-Y*scalling)); //ERR
ctx.lineTo((XmoyeuNew-rebordInterneNew+ETPneuNew*scalling+largeurPneuNew*scalling),(YNew-demiRimNew-Y*scalling)); ctx.lineTo((XmoyeuNew-rebordInterneNew+ETPneuNew*scalling+largeurPneuNew*scalling),(YNew-demiRimNew-Y*scalling)); //ERR
ctx.lineTo(XmoyeuNew+largeurRimNew-rebordInterneNew,YNew-demiRimNew); ctx.lineTo(XmoyeuNew+largeurRimNew-rebordInterneNew,YNew-demiRimNew); //ERR
ctx.setLineDash([0]); ctx.setLineDash([0]);
ctx.lineJoin="round"; ctx.lineJoin="round";
ctx.lineCap="round"; ctx.lineCap="round";