Changing cursor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing cursor

hugues parvillers
Hello,

First, tks to Andreas and Thomas for their answers to
my previous question about reloading a new url into
batik via a script.

Finally I used an <a> in the map, setting the
xlink:href and then forwarding the evt initiating the
script to this  <a>.

--

So my today worry is about changing cursor.

Considerer the "educating" sample of yosemite park
from carto.net, I would like also to change cursor
appareance why going near the borders of the map.

If so, when clicking in that area, the map is then
relocated.


I'm able to identify that I'm in the 5% width/height
area near the border of the main map, but nothing
exact happens to the cursor when I set

myMainMap.mapSVG.setAttributeNS(null,"cursor","move");

The cursor changes randomly to the right appareance
when moving on the map without correct reason ?

Is there any artefact or trouble with the fact I'm
still over the same object ? What is the exact
condition (event ?) for the cursor to change of
appareance ?

Where am I wrong ?

many thanks in advance.

H/P
France

sample on line:
http://parvillers.homeip.net/grosvol/t.svg



       

       
               
__________________________________________________________________
D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Cr?ez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Changing cursor

thomas.deweese
Hi Hugues,

hugues parvillers wrote:
> I'm able to identify that I'm in the 5% width/height
> area near the border of the main map, but nothing
> exact happens to the cursor when I set
>
> myMainMap.mapSVG.setAttributeNS(null,"cursor","move");
>
> The cursor changes randomly to the right appareance
> when moving on the map without correct reason ?

   The cursor only changes when you are 'over' an element
with pointer events.  The easiest thing to do would be
to add:
    <rect x="0" y="0" width="100%" height="100%"
        visibility="hidden" pointer-events="fill"/>
as the first child of your SVG element.

> Is there any artefact or trouble with the fact I'm
> still over the same object ? What is the exact
> condition (event ?) for the cursor to change of
> appareance ?

   I don't think so...  But I could be wrong.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]