Adjust course angle when rotating view

Este commit está contenido en:
Mattéo Delabre 2020-07-26 21:03:41 +02:00
padre dd950a95e8
commit 5db750adca
Firmado por: matteo
ID de clave GPG: AE3FBD02DC583ABB
Se han modificado 2 ficheros con 6 adiciones y 2 borrados

Ver fichero

@ -22,7 +22,7 @@
"no-console": ["error", {"allow": ["info", "warn", "error"]}],
"no-multi-str": "off",
"func-style": ["error", "expression"],
"max-len": ["error", {"code": 80}],
"max-len": ["error", {"code": 79}],
"lines-around-comment": ["error", {"allowBlockStart": true}],
"jsdoc/require-returns": "off"
}

Ver fichero

@ -125,7 +125,11 @@ const create = target => {
const color = network.lines[course.line].color;
const style = getCourseStyle(color);
style.getImage().setRotation(course.angle);
style.getImage().setRotation(
view.getRotation() +
course.angle
);
ctx.setStyle(style);
const point = new Point(course.position);