Skip to content

Conversation

@chrisnojima
Copy link
Contributor

@chrisnojima chrisnojima commented Jul 17, 2024

  • ios rotated
  • android

}, [])

// in order for the images to not get downscaled we have to make it larger and then transform it
const manualScale = 5
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we can skip this


const translationX = useSharedValue(0)
const translationY = useSharedValue(0)
const velocityX = useSharedValue(0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let it fling like ios a bit

.onStart(() => {
if (isPinching.value || !isZoomed.value) return

.averageTouches(true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we want the center of touches and not jump around depending on how fingers go up / down

.onUpdate(e => {
if (isPinching.value || !isZoomed.value) {
// if we're done panning ignore us letting go
if (e.numberOfPointers < panFingers.value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so when you transition from a pinch to just fingers we don't pan around after, its too jarring

panTranslateX.value = e.translationX
panTranslateY.value = e.translationY
} else {
// imagine what happens to pixels when we zoom in. (they get multiplied by x times scale)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this logic

@chrisnojima chrisnojima merged commit b25bbdc into master Jul 23, 2024
@chrisnojima chrisnojima deleted the nojima/HOTPOT-fix-zoom branch July 23, 2024 14:26
mmaxim added a commit that referenced this pull request Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants