I have built an SVG image image which involved some translations, and an <svg>
tag within an <svg>
tag to produce a rescaling effect on the coordinates.
The SVG shows as I expect on desktop, but when I try to view the SVG in a browser on a mobile device, the contents of the inner <svg>
are not translated in the same way as on desktop.
Solution attempts
My initial attempts at debugging this issue are:
- View the SVG on another mobile device. Initially, I viewed the SVG on a Samsung Android device so I thought to try an iOS Apple mobile device. The same translation issue occurs on iOS.
- Attempt to view the page source on the mobile device. Without developer tools, I managed this by using a Javascript
setTimeout
to trigger analert
showing the<svg>
's inner HTML. All contents of the SVG are the same on both desktop and mobile.
Given that all the transform="translate(x y)"
and transform="scale(x y)"
attributes are the same on both desktop and mobile, but producing different translations, I am lead to think there are some SVG features not supported on mobile, or a similar cause.
Is anyone aware of differences in SVG performance between desktop and mobile, specifically where translations and/or scaling is concerned ?