Adjust course angle when rotating view

This commit is contained in:
Mattéo Delabre 2020-07-26 21:03:41 +02:00
父節點 dd950a95e8
當前提交 5db750adca
簽署人: matteo
GPG 金鑰 ID: AE3FBD02DC583ABB
共有 2 個檔案被更改,包括 6 行新增2 行删除

查看文件

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

查看文件

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