473,480 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SVGZoomEvent

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
1 1401
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
4186
by: RobG | last post by:
When using createEvent, an eventType parameter must be provided as an argument. This can be one of those specified in DOM 2 or 3 Events, or it might be a proprietary eventType. My problem is...
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.