| | |
| | | |
| | | <FloatButton.Group |
| | | hidden={model === MapModel.OBSERVER_MODEL} |
| | | // trigger="hover" |
| | | style={{ |
| | | right: 35, |
| | | bottom: 35 |
| | | left: 35, |
| | | bottom: window.innerHeight / 2 |
| | | }} |
| | | icon={<AppstoreAddOutlined />} |
| | | > |
| | | <FloatButton |
| | | hidden={model === MapModel.OBSERVER_MODEL} |
| | | type={deviceVisible ? 'primary' : 'default'} |
| | | tooltip={<div><FormattedMessage id='map.device.add' defaultMessage='添加设备' /></div>} |
| | | icon={<FileAddOutlined />} |
| | | onClick={() => { |
| | | setDeviceVisible(true); |
| | | if (deviceVisible) { |
| | | setDeviceVisible(false); |
| | | } else { |
| | | setDeviceVisible(true); |
| | | setModel(MapModel.MOVABLE_MODEL); |
| | | } |
| | | }} |
| | | /> |
| | | <FloatButton |
| | |
| | | <Edit |
| | | open={deviceVisible} |
| | | onCancel={() => { |
| | | setDeviceVisible(false); |
| | | // setDeviceVisible(false); |
| | | }} |
| | | refCurr={mapRef.current} |
| | | onDrop={onDrop} |