Lint
This commit is contained in:
parent
94f9c0d594
commit
5c3b87f2d5
69 changed files with 1334 additions and 213 deletions
|
|
@ -84,7 +84,11 @@ interface Dimensions {
|
|||
height: number;
|
||||
}
|
||||
|
||||
function resolveInset(pixelValue: number | undefined, ratioValue: number | undefined, size: number) {
|
||||
function resolveInset(
|
||||
pixelValue: number | undefined,
|
||||
ratioValue: number | undefined,
|
||||
size: number
|
||||
) {
|
||||
return Math.max(0, (pixelValue ?? 0) + (ratioValue ?? 0) * size);
|
||||
}
|
||||
|
||||
|
|
@ -122,8 +126,7 @@ function getViewportRelativeVisibleAreaCenter(
|
|||
const viewportWidth = window.innerWidth;
|
||||
const viewportHeight = window.innerHeight;
|
||||
const viewportLeft = resolveInset(area.left, area.leftRatio, viewportWidth);
|
||||
const viewportRight =
|
||||
viewportWidth - resolveInset(area.right, area.rightRatio, viewportWidth);
|
||||
const viewportRight = viewportWidth - resolveInset(area.right, area.rightRatio, viewportWidth);
|
||||
const viewportTop = resolveInset(area.top, area.topRatio, viewportHeight);
|
||||
const viewportBottom =
|
||||
viewportHeight - resolveInset(area.bottom, area.bottomRatio, viewportHeight);
|
||||
|
|
@ -532,7 +535,12 @@ export default memo(function Map({
|
|||
<div className="px-3 py-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<img
|
||||
src={getPoiIconUrl(popupInfo.category, popupInfo.emoji)}
|
||||
src={getPoiIconUrl(
|
||||
popupInfo.category,
|
||||
popupInfo.emoji,
|
||||
popupInfo.icon_category,
|
||||
popupInfo.name
|
||||
)}
|
||||
alt=""
|
||||
aria-hidden="true"
|
||||
loading="lazy"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue