Narendra Sisodiya schrieb am 20.11.2010 05:36:
> On Sat, Nov 20, 2010 at 9:03 AM, Kenneth Nellis <[email protected]>wrote:
>> I have this SVG file* that displays a centered grid, dimensions
>> 10x10, that scales to the size of the web page. I've attached an
>> "onclick" handler to the grid that displays the x,y coordinates of
>> the click point. I want the coordinates to be of the grid's
>> coordinate system, but I'm getting the coordinates of the web page.
>> I'm hoping someone can advise how to fix this.
>> 揖en Nellis
>> * http://homepage.mac.com/nellisks/yahoo/groups/svg-developers/
>> gridClick.svg
> I am using Firefox -
> x = evt.offsetX; is not not giving correct result,
> Error - x is undefined when it is used later
offsetX is only available in opera, safari, chrome.
layerX is available in safari, chrome, firefox
clientx is available in all: opera, chrome, safari, firefox and adobe
svg viewer
pageX is available in all browsers (no adobe plugin) and is independant
from the scrolling.
But the problem is still that the offset of
document.getElementById("grid") compared to the page is apparently not
available. This is really suprising to me. I have not found a solution.
--
best regards
Holger
------------------------------------
-----
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> 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/