Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Adjusting position of image when user zoom image scale

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #275824
    Janjvr
    Participant

    I am building a html and css application where I use images to point out certain aspects on a image.

    I use img02.style.left and img02.style.top to position a image in div tag that overlay another image. When I zoom in on the lower level image with style.width = ‘200%’, I need to preposition the img02 image to a new left and top position. Currently I do the following:

    I place the initial left and right position in a variable, when user click on zoom button I use the stored variable and multiply with certain amount, in this case 1.5 and set new position. However this method does not work across the board for all my different pointers.

    Could you help me with the logic?

    #275827
    Paulie_D
    Member

    If you can put your basic code into a demo, ideally in Codepen.io we can take a look and see if we can help.

    At the moment it’s a little hard to tell what the issue is.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design’ is closed to new topics and replies.