Revize 7a3ad946
Přidáno uživatelem Fantič před více než 1 rok
src/components/plan/CastlePlanView.tsx | ||
---|---|---|
10 | 10 |
import { PlanImage, Room } from '../../types/plan'; |
11 | 11 |
import Svg, { SvgXml } from 'react-native-svg'; |
12 | 12 |
|
13 |
const CastlePlanView = (props: { mapImage: PlanImage, roomList: Room[], selectedRoom?: Room, fullScreenMode?: boolean }) => { |
|
13 |
const CastlePlanView = (props: { mapImage: PlanImage, roomList: Room[], selectedRoom?: Room, fullScreenMode?: boolean, height?: number }) => {
|
|
14 | 14 |
|
15 | 15 |
const DEFAULT_SCALE = 1 |
16 | 16 |
const MIN_SCALE = 0.95 |
... | ... | |
20 | 20 |
width: "100%" |
21 | 21 |
} |
22 | 22 |
|
23 |
const { mapImage, roomList, selectedRoom, fullScreenMode } = props; |
|
23 |
const { mapImage, roomList, selectedRoom, fullScreenMode, height } = props;
|
|
24 | 24 |
|
25 | 25 |
const panRef = useRef<React.ReactElement>(); |
26 | 26 |
const pinchRef = useRef<React.ReactElement>(); |
... | ... | |
77 | 77 |
// container |
78 | 78 |
<Box |
79 | 79 |
width={!fullScreenMode ? MAP_VIEW_SIZE.width : Dimensions.get('window').width - 5} |
80 |
height={!fullScreenMode ? MAP_VIEW_SIZE.height : Dimensions.get('window').height - 62.5}
|
|
80 |
height={height ? height : (!fullScreenMode ? MAP_VIEW_SIZE.height : Dimensions.get('window').height - 62.5)}
|
|
81 | 81 |
// @ts-ignore |
82 | 82 |
style={ |
83 | 83 |
fullScreenMode ? { |
... | ... | |
86 | 86 |
marginRight: 2.5, |
87 | 87 |
} |
88 | 88 |
: |
89 |
{ borderColor: "#F5F5F", borderWidth: 1, overflow: "hidden" } |
|
90 |
}> |
|
89 |
{ overflow: "hidden" } |
|
90 |
} |
|
91 |
borderColor={"light.300"} |
|
92 |
borderRadius={10} |
|
93 |
borderWidth={1}> |
|
91 | 94 |
<PinchGestureHandler |
92 | 95 |
ref={pinchRef} |
93 | 96 |
// @ts-ignore |
Také k dispozici: Unified diff
re #10871: PlanViewPage: Tabs Castle/Results, styling