Merge branch 'master' of https://git.code.tencent.com/beijing-rtss-test/bj-rtss-client
This commit is contained in:
commit
7fbbe51486
@ -37,8 +37,8 @@ function getDefaultEndPoint() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const setNormalPosition: MenuItemOptions = { name: '设置定位' };
|
const setNormalPosition: MenuItemOptions = { name: '定操' };
|
||||||
const setReversePosition: MenuItemOptions = { name: '设置反位' };
|
const setReversePosition: MenuItemOptions = { name: '反操' };
|
||||||
|
|
||||||
const addTrainConfig: MenuItemOptions = {
|
const addTrainConfig: MenuItemOptions = {
|
||||||
name: '添加列车',
|
name: '添加列车',
|
||||||
|
@ -418,8 +418,9 @@ export class Train extends JlGraphic {
|
|||||||
const px = startP.x + Math.round(offset * (endP.x - startP.x));
|
const px = startP.x + Math.round(offset * (endP.x - startP.x));
|
||||||
const py = startP.y + Math.round(offset * (endP.y - startP.y));
|
const py = startP.y + Math.round(offset * (endP.y - startP.y));
|
||||||
let angle = Math.atan2(endP.y - startP.y, endP.x - startP.x);
|
let angle = Math.atan2(endP.y - startP.y, endP.x - startP.x);
|
||||||
if (-Math.PI / 2 > angle) {
|
const exact = Math.PI / 16;
|
||||||
angle = -(angle + Math.PI);
|
if (-Math.PI / 2 - exact > angle) {
|
||||||
|
angle = angle + Math.PI;
|
||||||
}
|
}
|
||||||
if (Math.PI / 2 <= angle) {
|
if (Math.PI / 2 <= angle) {
|
||||||
angle = angle - Math.PI;
|
angle = angle - Math.PI;
|
||||||
|
Loading…
Reference in New Issue
Block a user