Loading ...
Sorry, an error occurred while loading the content.
 

Finding the center of a possibly scrolled image (stand-alone SVG)

Expand Messages
  • sroush1
    For stand-alone SVG, I am trying to reposition an SVG element in the middle (or top or bottom) of the visible part of the screen, even after scrolling. For
    Message 1 of 2 , Jan 28, 2013
      For stand-alone SVG, I am trying to reposition an SVG element in the middle (or top or bottom) of the visible part of the screen, even after scrolling.
      For stand-alone SVG, IE 10, chrome, and Safari do not correctly report window.pageYOffset or window.scrollY. Firefox 19.0 does work.
      Can anyone suggest what I might be doing incorrectly or another way to find the center/top/bottom of a (possibly) scrolled stand-alone SVG image?

      thanks,
      steve
    • Richard Pearman
      Hi, Firefox 19 (isn t this still in beta), well the last one I tested a couple of days ago, has a bug related to height, width and viewBox. This results in
      Message 2 of 2 , Jan 30, 2013
        Hi,

        Firefox 19 (isn't this still in beta), well the last one I tested a couple of days ago, has a bug related to height, width and viewBox. This results in files which have height="100%" and width="100%" get displayes as if they had height="75%" and width="75%". This could mean that it's Firefox which is wrong the other browsers displaying for files according to speck.

        Richard Pearman http://www.pixelpalaces.com/
        The next stage in the evolution of web comics: http://www.onlinecomics.net/pages/details/listing.php?comicID=4415
        Read my Helium articles: http://www.helium.com/users/212199
        South Alberta Cactus and succulent society: http://www.facebook.com/group.php?gid=20360241008
        Make money from discussing things: http://www.myLot.com?ref=Graptopetalum

        ----- Original Message -----
        From: sroush1
        To: svg-developers@yahoogroups.com
        Sent: Monday, January 28, 2013 2:09 PM
        Subject: [svg-developers] Finding the center of a possibly scrolled image (stand-alone SVG)



        For stand-alone SVG, I am trying to reposition an SVG element in the middle (or top or bottom) of the visible part of the screen, even after scrolling.
        For stand-alone SVG, IE 10, chrome, and Safari do not correctly report window.pageYOffset or window.scrollY. Firefox 19.0 does work.
        Can anyone suggest what I might be doing incorrectly or another way to find the center/top/bottom of a (possibly) scrolled stand-alone SVG image?

        thanks,
        steve



        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.