Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Why would SVG coordinate offsets are different on mobile to desktop?

$
0
0

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:

  1. 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.
  2. Attempt to view the page source on the mobile device. Without developer tools, I managed this by using a Javascript setTimeout to trigger an alert 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 ?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>