We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Binded (bound?) HTML element’s projected coordinates?

Home Forums Puzzles Binded (bound?) HTML element’s projected coordinates?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #30294
    GLiFTeK
    Customer

    hi i was using offsetTop and offsetLeft to get a div’s coordinates, which works fine.

    how do i get the updated coordinates of a div that is bound to an object?
    i tried getting the projected.x/y from a copy of the bind code i tried to customize but no luck… just getting 0 , 0. (as it’s parented. obviously.)

    also, is there any way to have the CENTER of the binding element be the reference point to what binds to the object instead of top left?

    thanks!

    EDIT: i did this:

    #draggableSpan{
        pointer-events: none;
        left: -100px;
        top: -100px;
    }
    
    #anchor {
        pointer-events: none;
        position: fixed;
        right: 50%;
        bottom: 50%;
    }

    but is there a way to do it without this second div?

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.