| | |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | player.adaptScreen(); |
| | | notify.info(translate('page.map.welcome')); |
| | | player.adaptScreen(); |
| | | setDataFetched(true); |
| | | setMode(MAP_MODE.OBSERVER_MODE); |
| | | }, 200) |
| | |
| | | flexGrow: 1, // fill remaining of map space |
| | | position: 'relative', |
| | | backgroundColor: '#fff', |
| | | ...(mode === MAP_MODE.SETTINGS_MODE && { |
| | | animation: 'settingsPulse 1.5s infinite', |
| | | '@keyframes settingsPulse': { |
| | | '0%': { |
| | | boxShadow: `0 0 3px 1px ${theme.palette.primary.main.replace('rgb', 'rgba').replace(')', `, 0.1)`)}`, |
| | | }, |
| | | '50%': { |
| | | boxShadow: `0 0 8px 3px ${theme.palette.primary.main.replace('rgb', 'rgba').replace(')', `, 0.5)`)}`, |
| | | }, |
| | | '100%': { |
| | | boxShadow: `0 0 3px 1px ${theme.palette.primary.main.replace('rgb', 'rgba').replace(')', `, 0.1)`)}`, |
| | | }, |
| | | }, |
| | | }) |
| | | }} |
| | | > |
| | | <Box |
| | |
| | | mapContainer = param; |
| | | } |
| | | |
| | | export const fetchMapData = async (zoneId) => { |
| | | export const fetchMapData = (zoneId) => { |
| | | Tool.clearMapData(); |
| | | await request.post('/map/data/fetch', { |
| | | return request.post('/map/data/fetch', { |
| | | zoneId: zoneId |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | |
| | | Object.assign(sprite.data, item.property); |
| | | |
| | | // graph |
| | | setTimeout(() => { |
| | | sprite.position.set(item.positionX, item.positionY); |
| | | sprite.scale.set(item.scaleX, item.scaleY); |
| | | sprite.rotation = Tool.rotationParseNum(item.rotation); |
| | | // setTimeout(() => { |
| | | sprite.position.set(item.positionX, item.positionY); |
| | | sprite.scale.set(item.scaleX, item.scaleY); |
| | | sprite.rotation = Tool.rotationParseNum(item.rotation); |
| | | |
| | | // support |
| | | switch (item.type) { |
| | | case DEVICE_TYPE.POINT: |
| | | sprite.scale.set(0.65, 0.65); |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | }, 50); |
| | | // support |
| | | switch (item.type) { |
| | | case DEVICE_TYPE.POINT: |
| | | sprite.scale.set(0.65, 0.65); |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | // }, 50); |
| | | |
| | | mapContainer.addChild(sprite); |
| | | } |