By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

SVGZoomEvent

P: n/a
Hello:

I want to capture the SVGZoom Event with JavaScript in my SVG file,

My code is:

<svg id="all" width="100%" height="100%" onzoom="zoom()">

<script type="text/JavaScript">

function zoom(){

var mess;

mess="";

mess+="\r\n";

mess+="zoomAndPan:"+evt.target.getAttribute("zoomA ndPan");

mess+="\r\n";

//How Can I get the "newScale" and the other Properties of the
SVGZoomEvent ;

alert(mess);

}

</script >

..............

..............

</svg>

Thank you for your help!!

My E-mail:we**********@163.com.cn

Mar 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
wenwu2008 wrote:
//How Can I get the "newScale" and the other Properties of the
SVGZoomEvent ;


zoom:
document.documentElement.currentScale

pan:
document.documentElement.currentTranslate.x
document.documentElement.currentTranslate.y

cu, Thomas
--
SVG - Learning By Coding
<http://svglbc.datenverdrahten.de/>
Mar 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.