Browse Source

Adjust course angle when rotating view

master
Mattéo Delabre 7 months ago
parent
commit
5db750adca
Signed by: matteo <spam@delab.re> GPG Key ID: AE3FBD02DC583ABB
2 changed files with 6 additions and 2 deletions
  1. +1
    -1
      .eslintrc.json
  2. +5
    -1
      src/front/map/index.js

+ 1
- 1
.eslintrc.json View File

@@ -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"
}


+ 5
- 1
src/front/map/index.js View File

@@ -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);


Loading…
Cancel
Save