| Newsgroups |
gmane.text.xml.svg.devel |
| Message-ID |
<[email protected]> |
Paul,
> you cannot drag or pinch the inner svg element without dragging or zooming the entire window
?? That viewer was written 12 years ago, there was no iPad then. I was wondering if one of the images that you can load, Zambia for example, gets abnormally resized on an iPad –always assuming that you can see the list and the proxy viewer to the left. It is not missing any “proper html viewport metatag” for the simple fact that it’s SVG :) (the sizes and layout are configurable).
I propose that you focus first on finding out if your image gets resized in a weird manner in a bare environment, like:
<svg>
<g>
<image>
Set the viewbox of the svg to the size of the image, then:
> a) leave the height, width, x and y attributes on the image element alone?
Yes.
> b) give the container g element height, width, x and y attributes, or not?
No.
> c) can you suggest possible transform values for the new g element?
Play with transforms, scale in particular, either with hardcoded values in the transform attribute, or through script.
If the iPad mini 1 and 3 still apply non uniform scaling, you can still try to specifically set the preserveAspectRatio to xMidYMid for the image (just in case that default was not implemented for some reason).
If that doesn’t work (after making sure that it does work in desktop implementations), you can try submitting that simple test case to Apple.
If instead it does work, you should consider refactoring the application. The methodology that you are using is not the most natural way, to say the least. For example, acting on the dimensions of the <div>, rather than on the svg’s viewbox, or more simply on a transformable layer, is definitely strange. Like it’s strange to not simply and advantageously use plain SVG for the whole interface, like Joseph Liard says in in post 66417
(https://groups.yahoo.com/neo/groups/svg-developers/conversations/messages/66417 https://groups.yahoo.com/neo/groups/svg-developers/conversations/messages/66417).
Domenico