You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interactive area does not match the shape of the SVG object while scaling on Android
I'm working on an interactive map in which we have sections and each section is a different SVG. They are contained inside a view that does all the zoom control to give more details of the map. When we zoom in the touchable areas don't match the visual areas on Android.
I noticed that the actual pressable area on Android does not take into account a transformation occurring in a parent element. Therefore it does not trigger events in the drawn area, just in the original area not accounting for the scale transformation.
This issue does not occur on iOS it only presents itself on Android.
When testing on Android when you try to tap the lower part of the top blue shape. It will not trigger the alert. The "non scaled version" on the bottom part works as it should.
I'm happy with any workaround, also can try to fix it if someone is kind enough to point me in the right direction. I was guessing this problem was due to the pointer-events issue on Android (#1034) however I noticed that was not the only issue.
Interactive area does not match the shape of the SVG object while scaling on Android
I'm working on an interactive map in which we have sections and each section is a different SVG. They are contained inside a view that does all the zoom control to give more details of the map. When we zoom in the touchable areas don't match the visual areas on Android.
I noticed that the actual pressable area on Android does not take into account a transformation occurring in a parent element. Therefore it does not trigger events in the drawn area, just in the original area not accounting for the scale transformation.
This issue does not occur on iOS it only presents itself on Android.
Snack to reproduce the error:
https://snack.expo.dev/@amorales85/react-svg-pointer-events-android
When testing on Android when you try to tap the lower part of the top blue shape. It will not trigger the alert. The "non scaled version" on the bottom part works as it should.
I'm happy with any workaround, also can try to fix it if someone is kind enough to point me in the right direction. I was guessing this problem was due to the pointer-events issue on Android (#1034) however I noticed that was not the only issue.
Unexpected behavior
All the shape portions of the SVG should be receiving events. Right now just the original (not scale area) is able to trigger events.
https://snack.expo.dev/@amorales85/react-svg-pointer-events-android
Environment info
Library version: 12.3.0 (both on the snack and locally).
Steps To Reproduce
Describe what you expected to happen:
The text was updated successfully, but these errors were encountered: