修正楼层显示顺序
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
NAV_ROUTE_READINESS
|
||||
} from '@/domain/guideReadiness'
|
||||
import {
|
||||
compareFloorsTopToBottom,
|
||||
isIndoorNavigableFloor,
|
||||
isPoiOnIndoorNavigableFloor
|
||||
} from '@/domain/guideFloor'
|
||||
@@ -105,7 +106,7 @@ export class StaticGuideRepository implements GuideRepository {
|
||||
const floorIndex = await this.provider.loadFloorIndex()
|
||||
return [...floorIndex.floors]
|
||||
.filter((floor) => isStaticIndoorNavigableFloorId(floor.floorId))
|
||||
.sort((a, b) => b.order - a.order)
|
||||
.sort(compareFloorsTopToBottom)
|
||||
.map((floor) => ({
|
||||
id: floor.floorId,
|
||||
label: formatNavFloorLabel(floor.floorId),
|
||||
@@ -223,7 +224,7 @@ export class SgsSdkGuideRepository implements GuideRepository {
|
||||
this.floorAliases = buildSgsFloorAliases(indoorFloors)
|
||||
this.floorsCache = [...manifest.floors]
|
||||
.filter(isIndoorNavigableFloor)
|
||||
.sort((a, b) => Number(a.sortOrder || 0) - Number(b.sortOrder || 0))
|
||||
.sort(compareFloorsTopToBottom)
|
||||
.map(toMuseumFloorFromSgs)
|
||||
|
||||
return this.floorsCache
|
||||
|
||||
Reference in New Issue
Block a user