| | |
| | | if (!mapContainer && !dataFetched) { |
| | | return; |
| | | } |
| | | |
| | | switch (model) { |
| | | case MapModel.OBSERVER_MODEL: |
| | | |
| | |
| | | player.activateMapEvent(null); |
| | | |
| | | Utils.removeSelectedEffect(); |
| | | setCurSPrite(null); |
| | | setDeviceVisible(false); |
| | | setSettingsVisible(false); |
| | | |
| | |
| | | /> |
| | | )} |
| | | </Col> |
| | | <Col span={12} style={{ backgroundColor: '#4a69bd' }}> |
| | | <Col span={12} style={{ backgroundColor: styles.dark ? '#2C3A47' : '#4a69bd' }}> |
| | | <Flex className={styles.flex} gap={'large'} justify={'flex-end'} align={'center'}> |
| | | |
| | | {model === MapModel.OBSERVER_MODEL && ( |
| | |
| | | <Button |
| | | className='map-header-button' |
| | | size={'large'} |
| | | onClick={() => { |
| | | Utils.fetchMapData(intl); |
| | | onClick={async () => { |
| | | await Utils.fetchMapData(intl); |
| | | |
| | | player.hideGridlines(); |
| | | player.hideStarryBackground(); |
| | | |
| | | player.activateMapEvent(null); |
| | | |
| | | Utils.removeSelectedEffect(); |
| | | setCurSPrite(null); |
| | | setDeviceVisible(false); |
| | | setSettingsVisible(false); |
| | | setDrawerVisible(false); |
| | | |
| | | mapContainer.children.forEach(child => { |
| | | Utils.viewFeature(child, setCurSPrite); |
| | | }) |
| | | |
| | | }} |
| | | > |
| | | <FormattedMessage id='map.load' defaultMessage='加载地图' /> |