|
@@ -42,6 +42,8 @@ const Map: React.FC<MapProps> = ({ type, selFloorId, render, mapList, mapSize })
|
|
|
const [minscale, setMinscale] = useState<number>(0.3);
|
|
|
const [canMove, setCanMove] = useState<boolean>(false);
|
|
|
|
|
|
+ const [mapHeight, setMapHeight] = useState(500);
|
|
|
+
|
|
|
const currentFloorId = useRef<any>(null);
|
|
|
const mapRef = useRef();
|
|
|
// let mapWidth: number = 3000,
|
|
@@ -196,6 +198,11 @@ const Map: React.FC<MapProps> = ({ type, selFloorId, render, mapList, mapSize })
|
|
|
);
|
|
|
}, []);
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
+ console.log('document', document.body.offsetHeight);
|
|
|
+ var bodyHeight = document.body.offsetHeight;
|
|
|
+ setMapHeight(bodyHeight - 293);
|
|
|
+ }, []);
|
|
|
return (
|
|
|
<div
|
|
|
className={mapstyles.mapwrap}
|
|
@@ -209,6 +216,7 @@ const Map: React.FC<MapProps> = ({ type, selFloorId, render, mapList, mapSize })
|
|
|
onMouseMove={(event) => {
|
|
|
mouseMoveEvent(event);
|
|
|
}}
|
|
|
+ style={{ height: mapHeight + 'px' }}
|
|
|
>
|
|
|
<div
|
|
|
className={cx(mapstyles.map, { [mapstyles.equipmentMap]: type == 'equipment' })}
|