Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

svg clientx

function clicked(evt){
    var e = evt.target;
    var dim = e.getBoundingClientRect();
    var x = evt.clientX - dim.left;
    var y = evt.clientY - dim.top;
    alert("x: "+x+" y:"+y);
}  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #svg #clientx
ADD COMMENT
Topic
Name
6+8 =