Loading ...
Sorry, an error occurred while loading the content.

Drag and Drop constraints and container size change

Expand Messages
  • vaxace
    I have an absolutely positioned div inside a relatively positioned div. The inner div has a drag and drop object (YAHOO.util.DD) associated with it and the DD
    Message 1 of 2 , Aug 27, 2009
    • 0 Attachment
      I have an absolutely positioned div inside a relatively positioned div.
      The inner div has a drag and drop object (YAHOO.util.DD) associated with it and the DD has X and Y constraints set.

      The absolute positioning relative to the containing div is used to simplify initial placement of the inner div.

      The issue is that the containing div can be resized as a result of the viewport being resized. I need to reset the constraints accordingly, or better yet, have the DD handle it itself.

      Ideas?

      Thanks,

      D.
    • viruschidai
      I think you need to write a function to reset the constraint and call it whenever the container div resizes. Remember to call dd.resetConstraints() before you
      Message 2 of 2 , Aug 27, 2009
      • 0 Attachment
        I think you need to write a function to reset the constraint and call it whenever the container div resizes.

        Remember to call dd.resetConstraints() before you set the new constraint values.

        regards,
        Bill

        --- In ydn-javascript@yahoogroups.com, "vaxace" <dmp-yahoo@...> wrote:
        >
        > I have an absolutely positioned div inside a relatively positioned div.
        > The inner div has a drag and drop object (YAHOO.util.DD) associated with it and the DD has X and Y constraints set.
        >
        > The absolute positioning relative to the containing div is used to simplify initial placement of the inner div.
        >
        > The issue is that the containing div can be resized as a result of the viewport being resized. I need to reset the constraints accordingly, or better yet, have the DD handle it itself.
        >
        > Ideas?
        >
        > Thanks,
        >
        > D.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.