Skip to content

Commit

Permalink
fix: pokestop marker adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Jan 15, 2024
1 parent b0c587a commit c81340c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/markers/usePokestopMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function usePokestopMarker({
invasionSizes.unshift(
Icons.getSize('invasion', filters[`i${invasion.grunt_type}`]?.size),
)
popupYOffset += rewardMod.offsetY - 1
popupYOffset += invasionMod.offsetY - 1
popupX += invasionMod.popupX
popupY += invasionMod.popupY
}
Expand Down Expand Up @@ -226,13 +226,14 @@ export default function usePokestopMarker({
)
}
}
popupYOffset += rewardMod.offsetY - 1
popupX += rewardMod.popupX
popupY += rewardMod.popupY
popupYOffset += eventMod.offsetY - 1
popupX += eventMod.popupX
popupY += eventMod.popupY
})
}
const totalQuestSize = questSizes.reduce((a, b) => a + b, 0)
const totalInvasionSize = invasionSizes.reduce((a, b) => a + b, 0)
const totalShowcaseSize = showcaseSizes.reduce((a, b) => a + b, -3)

const showAr = showArBadge && ar_scan_eligible && !baseIcon.includes('_ar')

Expand All @@ -243,8 +244,8 @@ export default function usePokestopMarker({
? pokestopMod.manualPopup -
totalInvasionSize * 0.25 -
totalQuestSize * 0.1
: -(baseSize + totalInvasionSize + totalQuestSize) / popupYOffset) +
popupY,
: -(baseSize + totalInvasionSize + totalQuestSize + totalShowcaseSize) /
popupYOffset) + popupY,
],
className: 'pokestop-marker',
html: /* html */ `
Expand Down

0 comments on commit c81340c

Please sign in to comment.