MRchildNEO / svgweb

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

Flash renderer returning wrong ID when element uses href:xlink #613

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
The following SVG:

<?xml version="1.0"?>
<svg version="1.1"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">

    <script><![CDATA[
        function doMouseOver(icon) {
            alert(icon.id);
            document.getElementById(icon.id + "Flag").setAttribute('display', 'block');
        }
        function doMouseOut(icon) {
            document.getElementById(icon.id + "Flag").setAttribute('display', 'none');
        }
]]></script>

    <defs>
        <circle id="okIcon" cx="0" cy="0" r="6" stroke="black" fill="lightgreen"/>
        <circle id="warningIcon" cx="0" cy="0" r="12" stroke="black" fill="yellow">
        </circle>
        <polygon id="alertIcon" points="0,-18 -18,18 18,18" stroke="black" stroke-width="2" fill="red">
        </polygon>
    </defs>

    <g id="viewport" transform="scale(0.55)">
        <g id="rootZoom">
            <use id="dairyCase" x="590" y="40" xlink:href="#warningIcon" onmouseover="doMouseOver(this);"
                 onmouseout="doMouseOut(this);"/>

            <g display="none" id="dairyCaseFlag">
                <path d="M 635 70 L 600 50" fill="none" stroke="black" stroke-width="5" marker-end="url(#Triangle)"/>
                <svg id="goingBadPopup" x="630" y="40" width="150" height="60">
                    <rect x="0" y="0" height="60" width="150" rx="5" ry="5" fill="lightyellow" stroke="black"/>
                    <text x="10" y="20" font-size="20" fill="black">Temp:</text>
                    <text id="goingBadTempVal" x="70" y="20" font-size="20" fill="black">55.5 F</text>
                    <text x="10" y="50" font-size="20" fill="black">Time:</text>
                    <text id="goingBadTimeVal" x="70" y="50" font-size="20" fill="black">6:37pm</text>
                </svg>
            </g>

        </g>
    </g>

</svg>

What is the expected output? What do you see instead?
In Firefox, native rendering: mouse over the dot, and you get an alert saying 
'dairyCase'. 

With the Flash renderer: mouse over the dot, and you get an alert saying 
'warningIcon'.

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

Using Lurker Above, on Windows XP, Firefox and IE 7. Flash 10.1 r102

Please provide any additional information below. Reduced test cases are always 
appreciated!

Original issue reported on code.google.com by rob5...@gmail.com on 25 Apr 2011 at 9:51

GoogleCodeExporter commented 8 years ago
Upon further investigation, this appears to be a duplicate of issue 416.

Original comment by rob5...@gmail.com on 25 Apr 2011 at 10:03