Skip to content

Commit

Permalink
Fix allow small map and depth chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Reckless-Satoshi committed Oct 17, 2023
1 parent 2d6cc04 commit 16426dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Charts/DepthChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const DepthChart: React.FC<DepthChartProps> = ({
const [currencyCode, setCurrencyCode] = useState<number>(1);
const [center, setCenter] = useState<number>();

const height = maxHeight < 20 ? 20 : maxHeight;
const width = maxWidth < 20 ? 20 : maxWidth > 72.8 ? 72.8 : maxWidth;
const height = maxHeight < 10 ? 10 : maxHeight;
const width = maxWidth < 10 ? 10 : maxWidth > 72.8 ? 72.8 : maxWidth;

useEffect(() => {
setCurrencyCode(fav.currency === 0 ? 1 : fav.currency);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Charts/MapChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const MapChart: React.FC<MapChartProps> = ({
const [acceptedTilesWarning, setAcceptedTilesWarning] = useState<boolean>(false);
const [openWarningDialog, setOpenWarningDialog] = useState<boolean>(false);

const height = maxHeight < 20 ? 20 : maxHeight;
const width = maxWidth < 20 ? 20 : maxWidth > 72.8 ? 72.8 : maxWidth;
const height = maxHeight < 5 ? 5 : maxHeight;
const width = maxWidth < 10 ? 10 : maxWidth > 72.8 ? 72.8 : maxWidth;

return (
<Paper
Expand Down

0 comments on commit 16426dc

Please sign in to comment.