diff --git a/src/pages/TrainPage.vue b/src/pages/TrainPage.vue index 3f63f0b..d25484d 100644 --- a/src/pages/TrainPage.vue +++ b/src/pages/TrainPage.vue @@ -82,18 +82,8 @@ import { ITrainState, Train } from 'src/graphics/train/Train'; import { useLineStore } from 'src/stores/line-store'; import { ref, watch } from 'vue'; -type trainState = { - id: string; - up: boolean; - headLinkId: string; - headLinkOffset: number; - tailLinkId: string; - tailLinkOffset: number; - occupiedLinkIndex: string[]; - expanded?: boolean; -}; const lineStore = useLineStore(); -const trainInfo = ref(); +const trainInfo = ref(); watch( () => lineStore.selectedGraphics, (val) => { @@ -106,7 +96,7 @@ watch( ); function getTrainStates(train: Train) { trainInfo.value = null; - const s = train.getStates() as ITrainState; + const s = train.states as ITrainState; trainInfo.value = s; }