msand / zoomable-svg

Pinch to pan-n-zoom react-native-svg components using a render prop.
38 stars 14 forks source link

how to keep transform translateX and translateY to be the same on max scale (scaleX, scaley) #16

Open Maoravitan opened 3 years ago

Maoravitan commented 3 years ago

Hi, i try to keep the translateX and translateY to be the same when reaching the max zoom when scaleX or scaley === 3. how can we do that?

but i also want it to be able to drag

Object {
  "scaleX": 3,
  "scaleY": 3,
  "translateX": -528.1742063998316, - > this keep changing when user keep doing zoom in
  "translateY": -173.31884437708027   - > this keep changing when user keep doing zoom in
}

tnx