From 5db750adcaa60cb1dc95eb70263b93bf15e015b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Sun, 26 Jul 2020 21:03:41 +0200 Subject: [PATCH] Adjust course angle when rotating view --- .eslintrc.json | 2 +- src/front/map/index.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f1a2ea0..00610e2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -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" } diff --git a/src/front/map/index.js b/src/front/map/index.js index fa53b28..0051f73 100644 --- a/src/front/map/index.js +++ b/src/front/map/index.js @@ -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);