SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot spybreak's Avatar
    Join Date
    Apr 2003
    Location
    Germany
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    does anyone know if there's a "hand tool" like in photoshop?

    I have a big Image in a small Window. The user has to use the scrollbars to view the image. Does anyone know a script where one can navigate the page using something similar like the "hand tool" in photoshop?

    This is not crucial for me but it would be nice to have something like that

  2. #2
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you create the window large enough to display the image? That would probably be the best solution.

  3. #3
    SitePoint Zealot spybreak's Avatar
    Join Date
    Apr 2003
    Location
    Germany
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no.. "small Window" was misleading.. sorry

    the image is almost 2000 px wide

  4. #4
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure if this is what you want, but here is a link to a site that might have what you want.
    http://www.htmlguru.com/guru.html

    Click on the link for source files.

  5. #5
    SitePoint Zealot spybreak's Avatar
    Join Date
    Apr 2003
    Location
    Germany
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    even though its not exactly what I'm looking for, that's pretty cool.. but it uses Layers..

    What I want is something wich behaves exactly like the "hand tool" in Adobe Photoshop. If you ever tried it you know what I mean. There's a "hand tool" in Adobe Acrobat too.

  6. #6
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this. It's not exacy what you're looking, but kind of a variation on a theme.

    Also IE4+ only, but a fun idea that doesn't break the page for other browsers.

    In the head of the page (or linked to those pages that use it)...
    Code:
    <script type="text/javascript">
    	
    function scroller() {
    window.scrollTo( -200 + (event.clientX * 3), 0);
    }
    
    document.onmousemove = scroller;
    
    </script>
    Incidentally, it works fine under an XHTML 1.0 Strict DTD.


    Anyway, just an idea (not originally my idea, I hasten to add)

    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  7. #7
    SitePoint Zealot spybreak's Avatar
    Join Date
    Apr 2003
    Location
    Germany
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats a nice script. it comes pretty close to what i want.

    For some reason the area the script responds to is only about 200 pixels wide.. Why is that? I tried changing the "-200" to the size of my window: "-720".. Unfortunately it doesn't work either. The responding area then is about half-size of the window width..

    Thanks Bill. nice avatar

  8. #8
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    heh, thx (re: avatar)

    The -200 is simply an offset so you shouldn't need to go all the way to the left to zero the scroll.

    Try removing the '- 200 +' altogether and see how it behaves for you.
    It could be the offset that is preventing mouse movement on the right area from being picked up.

    (Fwiw, it works fine on IE5Mac as it is)

    Let me know if it fixes it.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  9. #9
    SitePoint Zealot spybreak's Avatar
    Join Date
    Apr 2003
    Location
    Germany
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, doesn't work. (Ie6 WIN)

    The active area has become even smaller now. About 150 pixels maybe.

  10. #10
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry that it's not working for you.

    Hopefully one of our more learned javascript-tastic members will step in and dissect the script and offer a more robust, cross-browser version.
    (As mentioned, it's not my script, just something I stumbled on.)

    Is it possible for you to place your page online?

    What is the browser you are using?
    Does the page scroll to both ends even though the 'responding area' is narrow?

    --

    Fwiw, seeing as you're open to IE-only solutions, it's worth knowing that the 'hand/grab tool' can be invoked in IE by Command-clicking (Mac OS) on the page and dragging the page about directly.
    I'm not sure if this facility is also available to Windows users by using the equivalent modifier key.

    Just a little nugget of info.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •