import React from 'react'; import { SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, Image, TouchableOpacity, View, } from 'react-native'; import { openDrawer } from '../../NavigationService'; import { px2dp, statusBarHeight } from './../../utils'; interface Props { opendFilter?: Function } interface State { } export default class MapViewBaseTool extends React.Component { constructor(props: Props) { super(props); }; public layoutRef = null; public hideAllMapKit = false; public readonly state: Readonly = { }; _opendFilter = () => { const { opendFilter } = this.props; opendFilter && opendFilter(); }; onPressMap() { if (this.hideAllMapKit) { this.layoutRef.setNativeProps({ style: { zIndex: 999 } }) } else { this.layoutRef.setNativeProps({ style: { zIndex: -999 } }) } this.hideAllMapKit = !this.hideAllMapKit; }; render() { return ( this.layoutRef = c} > {/* */} openDrawer('tool-box', {}, px2dp(260))} > openDrawer('map-tool', {}, px2dp(260))} > ) } } const styles = StyleSheet.create({ container: { width: px2dp(36), height: px2dp(72), position: 'absolute', top: statusBarHeight + px2dp(42), right: px2dp(12), zIndex: 999, borderRadius: px2dp(4), backgroundColor: 'rgba(255,255,255,0.68)', paddingVertical: px2dp(2) }, btn: { flex: 1, width: '100%', justifyContent: 'center', alignItems: 'center' }, toolIcon: { width: px2dp(32), height: px2dp(32) } })