hi Katharina

as you have a fill="none" the pointer events will only be send on 
mouseover the stroke.
just put pointer-events="fill" in your rectangles, and everything works 
fine.
another tip is , if its still to slow, dont use style properties , but 
the the fill attribute,
this will speed things up , too. but for this simple example, its 
definitly not needed.

hth
holger

tamsvg wrote:

>
> Hi!
>
> I've created some rectangles. With the event onmouseover the
> rectangles become another fill-colour. It works when I move the
> mouse pointer very slowly. If I move it more fast, it doesn't work
> (No colour change). Why?
>
> Heres the code:
>
> <?xml version='1.0' encoding='ISO-8859-1' ?>
> <svg width="30cm" height="30cm" xmlns="http://www.w3.org/2000/svg";>
>   <script type="text/javascript">
>      
>             function eventover(evt)
>             {           
>                   var raum = evt.getTarget();
>                   var style = raum.getStyle();
>                   var fillr = style.getPropertyValue('fill');
>                   style.setProperty('fill', 'red');
>             }
>             function eventout(evt)
>             {
>                   var raum = evt.getTarget();
>                   var style = raum.getStyle();
>                   var fillr = style.getPropertyValue('fill');
>                   style.setProperty('fill', 'none');
>             }
>             function eventclick(evt)
>             {
>                   var raum = evt.getTarget();
>                   var text = raum.getAttribute('id');
>                  
>                   var output = "Sie haben auf "+text+"
> geklickt!";
>                   alert(output);     
>             }
>
>             </script>
>   <rect id="Raum 1 (Nutzung: Arbeitsraum, Personenzahl: 3)"
> width="5cm" x="2cm" y="2cm" height="5cm" onmouseout="eventout(evt)"
> onclick="eventclick(evt)" style="stroke:black; fill:none; stroke-
> width:1" onmouseover="eventover(evt)"/>
>   <rect id="Raum 2 (Nutzung: Arbeitsraum, Personenzahl: 3)"
> width="5cm" x="7.2cm" y="2cm" height="5cm" onmouseout="eventout
> (evt)" onclick="eventclick(evt)" style="stroke:black; fill:none;
> stroke-width:1" onmouseover="eventover(evt)"/>
>   <rect id="Raum 3 (Nutzung: Flur, Personenzahl: 10)" width="10.2cm"
> x="2cm" y="7.2cm" height="3cm" onmouseout="eventout(evt)"
> onclick="eventclick(evt)" style="stroke:black; fill:none; stroke-
> width:1" onmouseover="eventover(evt)"/>
>   <rect id="Raum 4 (Nutzung: Arbeitsraum, Personenzahl: 3)"
> width="5cm" x="2cm" y="10.4cm" height="5cm" onmouseout="eventout
> (evt)" onclick="eventclick(evt)" style="stroke:black; fill:none;
> stroke-width:1" onmouseover="eventover(evt)"/>
>   <rect id="Raum 5 (Nutzung: Teek�che, Personenzahl: 1)" width="5cm"
> x="7.2cm" y="10.4cm" height="3cm" onmouseout="eventout(evt)"
> onclick="eventclick(evt)" style="stroke:black; fill:none; stroke-
> width:1" onmouseover="eventover(evt)"/>
> </svg>
>
>
> Thanks for answering
> Katharina




------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to