Image dragging / DHTML question...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • junk@straffin.com

    #1

    Image dragging / DHTML question...

    All,

    After being blown away by the stuff behind Google Maps, I am trying to
    find out how some of it was done. The part I'm trying to find out right
    now is best explained in the following scenario:

    Given a picture (200 x 200) and a div (100 x 100), I want to center the
    div over the picture and only show the center 100x100 section of the
    picture through the div. Then, when the user clicks and drags, I want
    to have the picture move under the unmoving div, thereby allowing the
    user to drag around and explore the picture through the div.

    Is what I want to do possible? If so, any pointers (or outright
    explanations) on how to do this?

    - John

  • Dietmar Meier

    #2
    Re: Image dragging / DHTML question...

    junk@straffin.c om wrote:
    [color=blue]
    > Given a picture (200 x 200) and a div (100 x 100), I want to center
    > the div over the picture and only show the center 100x100 section of
    > the picture through the div. Then, when the user clicks and drags, I
    > want to have the picture move under the unmoving div, thereby
    > allowing the user to drag around and explore the picture through the
    > div.[/color]

    Here's an example: https://www.innoline-systemtechnik.d.../imgdrag2.html

    ciao, dhgm

    Comment

    Working...