fixed the styling on the home marker
This commit is contained in:
parent
d8b42c8050
commit
6755764c75
3 changed files with 10 additions and 6 deletions
|
|
@ -665,7 +665,7 @@ export default function MapBase(props: Props) {
|
||||||
latitude={homePin.latitude}
|
latitude={homePin.latitude}
|
||||||
draggable
|
draggable
|
||||||
onDragEnd={homeDragEnd}
|
onDragEnd={homeDragEnd}
|
||||||
offset={[0, -25]}>
|
offset={[0, -30]}>
|
||||||
<Box
|
<Box
|
||||||
className={classes.pin}
|
className={classes.pin}
|
||||||
style={{ pointerEvents: "none", width: 50, height: 50, background: "red" }}>
|
style={{ pointerEvents: "none", width: 50, height: 50, background: "red" }}>
|
||||||
|
|
@ -674,11 +674,11 @@ export default function MapBase(props: Props) {
|
||||||
transform: "rotate(-45deg)",
|
transform: "rotate(-45deg)",
|
||||||
width: 30,
|
width: 30,
|
||||||
height: 30,
|
height: 30,
|
||||||
marginTop: -10,
|
marginTop: 10,
|
||||||
marginLeft: -10,
|
marginLeft: 7,
|
||||||
pointerEvents: "none"
|
pointerEvents: "none"
|
||||||
}}>
|
}}>
|
||||||
<HomeIcon type="light" />
|
<HomeIcon type="light" height={30} width={30} />
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Marker>
|
</Marker>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import { ErrorBoundary } from "react-error-boundary";
|
||||||
import { getWhitelabel } from "services/whiteLabel";
|
import { getWhitelabel } from "services/whiteLabel";
|
||||||
import Ventilation from "pages/VentEditor";
|
import Ventilation from "pages/VentEditor";
|
||||||
import FieldMap from "pages/FieldMap";
|
import FieldMap from "pages/FieldMap";
|
||||||
|
import GrainBag from "pages/grainBag";
|
||||||
|
|
||||||
const DeviceHistory = lazy(() => import("pages/DeviceHistory"));
|
const DeviceHistory = lazy(() => import("pages/DeviceHistory"));
|
||||||
const DevicePage = lazy(() => import("pages/Device"));
|
const DevicePage = lazy(() => import("pages/Device"));
|
||||||
|
|
@ -222,6 +223,7 @@ export default function Router(props: Props) {
|
||||||
<Route path="users" element={<Users/>} />
|
<Route path="users" element={<Users/>} />
|
||||||
<Route path="visualFarm" element={<FieldMap />} />
|
<Route path="visualFarm" element={<FieldMap />} />
|
||||||
<Route path="/logout" element={<Logout />} />
|
<Route path="/logout" element={<Logout />} />
|
||||||
|
<Route path="grainbags/:bagID" element={<GrainBag />} />
|
||||||
{/*
|
{/*
|
||||||
<ErrorBoundary FallbackComponent={ErrorFallback}>
|
<ErrorBoundary FallbackComponent={ErrorFallback}>
|
||||||
<Route path="*" element={<RelativeRoutes/>} />
|
<Route path="*" element={<RelativeRoutes/>} />
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,13 @@ import React from "react";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
type?: "light" | "dark";
|
type?: "light" | "dark";
|
||||||
|
height?: number | string
|
||||||
|
width?: number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function HomeIcon(props: Props) {
|
export default function HomeIcon(props: Props) {
|
||||||
const themeType = useThemeType();
|
const themeType = useThemeType();
|
||||||
const { type } = props;
|
const { type, height, width } = props;
|
||||||
|
|
||||||
const src = () => {
|
const src = () => {
|
||||||
if (type) {
|
if (type) {
|
||||||
|
|
@ -20,5 +22,5 @@ export default function HomeIcon(props: Props) {
|
||||||
return themeType === "light" ? HomeIconDark : HomeIconLight;
|
return themeType === "light" ? HomeIconDark : HomeIconLight;
|
||||||
};
|
};
|
||||||
|
|
||||||
return <ImgIcon alt="fields" src={src()} />;
|
return <ImgIcon alt="fields" src={src()} iconHeight={height} iconWidth={width} />;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue