Menu

#252 Events send wrong X/Y coords to relative layers.

open
nobody
5
2014-08-20
2005-08-12
No

When setting up a background layer, adding to that a
layer with a photograph, and adding to that a layer
that you move around (fetch and drag), then there's a
problem. The onmousedown event (and others) passes the
X and Y coordinates +8 or +9 or so. The upper left
corner of the fetched layer stops to the 8 or 9 pixels
to the lower right of the cursor. Therefore you can
never connect with a drag event. You must release the
mouse to stop the onmousedown event from firing, then
move the mouse over the layer, and mousedown again to
initiate a drag. If I remove the relative insert later
in the document, the upper left corner of the fetched
layer comes to a stop precisely underneath the mouse
cursor.

This might be used in a situation when you'll have some
text or images or other layers, then you'll want to
relatively insert this background layer, with it's
photo layer and it's fetchable/draggable layer. You
won't know ahead of time how to precisely position the
layer on the page, so everything must be done relative
to the background layer. Maybe there's another way to
do things? I'm still learning myself. I definitely
would like to understand where the offset is coming
from. I might have a hunch about some thing.

test1 example is attached below.

Discussion

  • - 2005-08-12

    test1 against 3.0.0-beta2

     
  • Doug Melvin

    Doug Melvin - 2005-09-01

    Logged In: YES
    user_id=184788

    where there not a LOT of comments on this bug? or was that
    confined to the mailing list?

    Anyways _my_ solution is to use the DynAPI Inline layer
    extension, then retrieve the posisiton of your relative
    layer then, suing the x/y obtained, simply proceed with
    treating your DynLayers as absulte layers..

    By this I mean do not add the DynLayer as a child of the
    relative layer, only retrieve the relative layer's x/7 and
    width/height.

     

Log in to post a comment.