运行线调整
This commit is contained in:
parent
e7c755348b
commit
bfd937da72
@ -173,9 +173,10 @@ function onUpdate() {
|
||||
function generatePathLine() {
|
||||
const runLine = drawStore.selectedGraphic as RunLine;
|
||||
if (runLine) {
|
||||
const points = runLineModel.points;
|
||||
const points1: Point[] = [];
|
||||
points.forEach((p) => points1.push(new Point(p.x, p.y)));
|
||||
runLineModel.points.forEach((p) =>
|
||||
points1.push(runLine.localToCanvasPoint(new Point(p.x, p.y)))
|
||||
);
|
||||
runLine.generatePathLine(points1);
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,12 @@ function buildAbsorbablePositions(Station: StationLine): AbsorbablePosition[] {
|
||||
runLines.forEach((runLine) => {
|
||||
const points = runLine.datas.points;
|
||||
for (let i = 0; i < points.length - 1; i++) {
|
||||
aps.push(new AbsorbableLine(points[i], points[i + 1]));
|
||||
aps.push(
|
||||
new AbsorbableLine(
|
||||
runLine.localToCanvasPoint(points[i]),
|
||||
runLine.localToCanvasPoint(points[i + 1])
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
return aps;
|
||||
|
Loading…
Reference in New Issue
Block a user