
Hello people.
I've started using SVG for some of the graphics on my pages, and encountered some problems - probably due to ignorance... but not for lack of trying to find answers:
1) If I 'embed' an SVN image in a page, and want to use it as a link to somewhere else, I find that the image isn't sensitive. I'm using Firefox 3.6 - I thought embedding was ok for the majority of browsers?
2) If I define the size smaller than the original image, I get scrollbars in Firefox. I thought SVN was scaleable? Or are the images only scaleable to larger sizes - never seen that mentioned...
I'd appreciate pointers to documentation for either or both issues.
Thanks John

Hi John, The scrollbars appear when using various combination's of window X.Y as measurements. To scale the page on a window basis use percentages such as: <svg height='100%' width='100%' ....
When embedding the svg, though, the results my be different. How are you embedding? An alternative is to invert the embeddeness, so that html is a foreigObject in an svg page.
MarkT

On Mon, 19 Apr 2010 13:44:55 +1000 Mark T <MarkT@...2210...> wrote:
Hi Mark,
Thanks for the reply. I tested several measurements and found that the scrollbars appear when the measurements are less than the x/y sizes in the svg image. In fact, the size must be specified a couple of pixels larger. I found a confirmation of this on the 'net (don't really remember where). I'll try the %-method, though if the image isn't useable as a link, it would not work for me anyway.
When embedding the svg, though, the results my be different. How are you embedding?
I tried:
<embed src="img_name" width="48" height="48" type="image/svg+xml">
<object data="img_name" width="48" height="48" type="image/svg+xml">
<img src="img_name" width="48" height="48">
The last one surprised me a little, but it is mentioned in the W3C recommendation for SVG. The first two showed the image correctly, but it wasn't sensitive to clicks (the link _did_ appear on the FF status bar). Possibly click events are 'absorbed' by the svg image.
An alternative is to invert the embeddeness, so that html is a foreigObject in an svg page.
That would probably take a lot of (scripting) work. I'd rather exhaust other possibilies first.
Cheers, John

Are you using xlink? http://www.w3.org/TR/SVG/linking.html
MarkT
participants (2)
-
John Coppens
-
Mark T