| | |
| | | effectCircle.position.set(selectedSprite.x, selectedSprite.y); |
| | | }; |
| | | |
| | | export const showRoutes = (curZone, setShowRoutes) => { |
| | | setShowRoutes(true); |
| | | getRouteList(curZone, (routeList) => { |
| | | export const showRoutes = (curZone, setShowRoutes, setLoading) => { |
| | | setLoading(true); |
| | | getRouteList( |
| | | curZone, |
| | | (routeList) => { |
| | | routeList.forEach(route => { |
| | | const startPoint = querySprite(DEVICE_TYPE.POINT, route.startCodeStr); |
| | | const endPoint = querySprite(DEVICE_TYPE.POINT, route.endCodeStr); |
| | |
| | | pointRoute.alpha = 1; |
| | | mapContainer.addChild(pointRoute); |
| | | }) |
| | | }) |
| | | setLoading(false); |
| | | setShowRoutes(true); |
| | | }, |
| | | () => { |
| | | setLoading(false); |
| | | }, |
| | | ) |
| | | }; |
| | | |
| | | export const hideRoutes = (curZone, setShowRoutes) => { |