mirror of
https://github.com/Spythere/srjp-td2.git
synced 2026-05-03 05:28:12 +00:00
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "srjp-td2",
|
"name": "srjp-td2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --mode staging",
|
"dev": "vite --mode staging",
|
||||||
|
|||||||
@@ -11,15 +11,40 @@
|
|||||||
{{ i == 0 || computedTimetable[i - 1].realLine != row.realLine ? row.realLine : ' ' }}
|
{{ i == 0 || computedTimetable[i - 1].realLine != row.realLine ? row.realLine : ' ' }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="border border-black dark:border-white relative">
|
<td
|
||||||
<div class="absolute top-0 left-0 w-full h-full p-0.5">
|
class="border border-black dark:border-white border-t-1 border-b-1 relative p-0"
|
||||||
|
:class="{
|
||||||
|
'border-t-0':
|
||||||
|
i == 0 ||
|
||||||
|
(computedTimetable[i - 1].departureSpeed == row.arrivalSpeed &&
|
||||||
|
computedTimetable[i - 1].departureTracks == row.arrivalTracks &&
|
||||||
|
computedTimetable[i - 1].realLine == row.realLine),
|
||||||
|
'border-b-0': i != computedTimetable.length - 1,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<div class="absolute top-0 left-0 w-full h-full">
|
||||||
<table class="h-full w-full border-collapse">
|
<table class="h-full w-full border-collapse">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr
|
||||||
<td class="align-top">{{ row.arrivalKm == '0.000' ? '' : row.arrivalKm }}</td>
|
:class="`align-top ${
|
||||||
|
i == 0 ||
|
||||||
|
(computedTimetable[i - 1].departureSpeed == row.arrivalSpeed &&
|
||||||
|
computedTimetable[i - 1].departureTracks == row.arrivalTracks &&
|
||||||
|
computedTimetable[i - 1].realLine == row.realLine)
|
||||||
|
? 'text-transparent'
|
||||||
|
: 'text-inherit'
|
||||||
|
}`"
|
||||||
|
>
|
||||||
|
<td>{{ row.arrivalKm }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr
|
||||||
<td class="align-bottom">{{ row.departureKm == '0.000' ? '' : row.departureKm }}</td>
|
:class="{
|
||||||
|
'border-black dark:border-white border-t align-top':
|
||||||
|
row.arrivalTracks != row.departureTracks || row.departureSpeed != row.arrivalSpeed,
|
||||||
|
hidden: row.arrivalTracks == row.departureTracks && row.departureSpeed == row.arrivalSpeed,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<td>{{ row.departureKm == '0.000' ? '' : row.departureKm }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -89,7 +89,10 @@ const computedTimetableRows = computed(() => {
|
|||||||
|
|
||||||
for (const stop of stopList) {
|
for (const stop of stopList) {
|
||||||
if (stop.arrivalLine && stop.arrivalLine == currentPath.arrivalLine) {
|
if (stop.arrivalLine && stop.arrivalLine == currentPath.arrivalLine) {
|
||||||
arrivalKm = stop.stopDistance;
|
console.log('arrivalKm', arrivalKm);
|
||||||
|
console.log('stopDistance', stop.stopDistance);
|
||||||
|
|
||||||
|
if (arrivalKm >= stop.stopDistance) arrivalKm = (Number(stopRows[stopRows.length - 1].departureKm ?? '0') + stop.stopDistance) / 2;
|
||||||
|
|
||||||
if (currentPath.arrivalLineData) {
|
if (currentPath.arrivalLineData) {
|
||||||
arrivalSpeed = currentPath.arrivalLineData.routeSpeed;
|
arrivalSpeed = currentPath.arrivalLineData.routeSpeed;
|
||||||
@@ -169,9 +172,17 @@ const computedTimetableRows = computed(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stop.departureLine && stop.departureLine == currentPath.departureLine) {
|
if (stop.departureLine && stop.departureLine == currentPath.departureLine) {
|
||||||
|
arrivalKm = stop.stopDistance;
|
||||||
|
|
||||||
// Reverse search for last scenery checkpoint
|
// Reverse search for last scenery checkpoint
|
||||||
for (let i = stopRows.length - 1; i > 0; i--) {
|
if (currentPath.departureLineData) {
|
||||||
if (currentPath.departureLineData) {
|
if (currentPath.departureLineData.routeLength != 0 && !currentPath.departureLineData.isRouteSBL)
|
||||||
|
arrivalKm = stop.stopDistance + currentPath.departureLineData.routeLength / 1000;
|
||||||
|
|
||||||
|
if (stopRows[stopRows.length - 1].isMain && currentPath.departureLineData.isRouteSBL && stop.departureLine == currentPath.departureLine)
|
||||||
|
arrivalKm = stop.stopDistance + currentPath.departureLineData.routeLength / 1000;
|
||||||
|
|
||||||
|
for (let i = stopRows.length - 1; i >= 0; i--) {
|
||||||
stopRows[i].departureTracks = currentPath.departureLineData.routeTracks;
|
stopRows[i].departureTracks = currentPath.departureLineData.routeTracks;
|
||||||
stopRows[i].departureSpeed = currentPath.departureLineData.routeSpeed;
|
stopRows[i].departureSpeed = currentPath.departureLineData.routeSpeed;
|
||||||
stopRows[i].realLine = currentPath.departureLineData.realLineNo?.toString() ?? '';
|
stopRows[i].realLine = currentPath.departureLineData.realLineNo?.toString() ?? '';
|
||||||
@@ -180,6 +191,19 @@ const computedTimetableRows = computed(() => {
|
|||||||
stopRows[i].departureSpeed = currentPath.departureLineData.routeSpeed;
|
stopRows[i].departureSpeed = currentPath.departureLineData.routeSpeed;
|
||||||
stopRows[i].departureTracks = currentPath.departureLineData.routeTracks;
|
stopRows[i].departureTracks = currentPath.departureLineData.routeTracks;
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
stop.departureLine,
|
||||||
|
currentPath.sceneryName,
|
||||||
|
stop.stopDistance,
|
||||||
|
currentPath.departureLineData.routeLength,
|
||||||
|
currentPath.departureLineData.isRouteSBL
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (currentPath.departureLineData.isRouteSBL)
|
||||||
|
arrivalKm = stop.stopDistance + (currentPath.departureLineData.routeSpeed <= 130 ? 1.0 : 2.0);
|
||||||
|
else */
|
||||||
|
|
||||||
abbrevs = getAbbrevs(currentPath.departureLineData);
|
abbrevs = getAbbrevs(currentPath.departureLineData);
|
||||||
stopRows[i].abbrevs = abbrevs;
|
stopRows[i].abbrevs = abbrevs;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user