You are right - the only way to adjust the "stroke-width" during zoom is with 
JavaScript.

 

On zoom, loop through all the elements that need their stroke adjusted, one by 
one read their "stroke-width", multiply it by the zoom factor then set it.

 

Hope that helps...

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
csorba_edith
Sent: Tuesday, August 08, 2006 5:40 AM
To: [email protected]
Subject: [svg-developers] decrease stroke-width when zoomed in?

 

Hi,
I would like to ask if anybody knows how it is possible to influence
the stroke-width when a feature is zoomed in too much. I want to make
the stroke of my features descrease proportionally with the zoom in rate.
I saw the option used in the Yosemite Hiking map:

document.getElementById("park_boundary")
.setAttributeNS(null,"stroke-width",myMainMap.curWidth*0.005);

But I did not manage to implement it on my map. I changed the multiple
factor (0.005) but it simple has no effect. 
Can somebody please explain how it works, or whether there is another
solution (demonstrate on a working example maybe).
Thank you in advance.
Regards
Csorba

 



[Non-text portions of this message have been removed]



-----
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