mustang2247 / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

xlink:href attribute on images does not properly change with the Flash renderer #456

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Set up an svg tag with an image tag inside it, with the image having an 
xlink:href attribute
2. In javascript (on load, on click, wherever), set that xlink:href to a 
different source file.

What is the expected output? What do you see instead?
In the Native Renderer, the javascript will set the source for the <image> tag 
to the second 
source, as expected.

In the Flash Renderer, it does not seem to pick up the attribute change, and 
will instead maintain 
the original xlink:href of the image

What version of the product are you using? On what operating system,
browser, and version of Flash?

I am using the Gelatinous Cube release of svg-web on Mac OS 10.6.2, with MAC 
10,0,42,34 as 
the Flash Player version. I have tested and confirmed this bug on the following 
browsers:

Safari (with flash rendering forced): Version 4.0.4 (6531.21.10)
Firefox (with flash rendering forced): Version 3.6

A demo test case is available at http://test.culturizer.com/svg-test/ to view, 
or for download to 
play with yourself at http://test.culturizer.com/svg-test/svg-text.zip

-Dave Stern

Original issue reported on code.google.com by david.l....@gmail.com on 22 Feb 2010 at 9:02

GoogleCodeExporter commented 8 years ago
Fixed in r1054.

Original comment by grick23@gmail.com on 28 Mar 2010 at 6:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I read that this issue is fixed in r1054 in May 28 2010 but I just found the 
same problem with svgweb-2011-02-03-Lurker-Above.

If I implement the following workaround by jmarranz it works.

http://groups.google.com/group/svg-web/browse_thread/thread/46e2396652e8ee43/7f4
12db5b8368770?lnk=gst&q=xlink#7f412db5b8368770

image.setAttributeNS(xlinkns, 'xlink:href','Bench2.jpg');
var imageClone = image.cloneNode(true);
var parentNode = image.parentNode;
parentNode.replaceChild(imageClone,image);
parentNode.replaceChild(image,imageClone); 

Original comment by f...@datenfalke.de on 5 Jun 2011 at 11:47