Skip to content

1 8 stable : Ticket #7084 - Draggable with parent containment and margin#143

Closed
ghusse wants to merge 1 commit into
jquery:1-8-stablefrom
ghusse:1-8-stable
Closed

1 8 stable : Ticket #7084 - Draggable with parent containment and margin#143
ghusse wants to merge 1 commit into
jquery:1-8-stablefrom
ghusse:1-8-stable

Conversation

@ghusse
Copy link
Copy Markdown
Contributor

@ghusse ghusse commented Mar 8, 2011

With 2 div elements, the parent has a fixed width (600px), the child element with a smaller width value. Both parent and child have the same height.

The child element has a left and right margin of about 5px, and is made draggable with the following options:

 {
    axis:"x",
    containment: "parent"
 }

When I dragg the child element on left or right, at the very end, child's magin is ignored on dragging. But once the element is dropped, it is moved according to the margin.

This correction fixes this particular issue about margins.

…of the draggable element. Fixed #7084 - Draggable with parent containment and margin
@scottgonzalez
Copy link
Copy Markdown
Member

Thanks for your patch, but the problem is that it's not taking the right margin into account, doubling the left margin isn't a valid fix.

@ghusse
Copy link
Copy Markdown
Contributor Author

ghusse commented Mar 8, 2011

I agree with that, I just adjusted my correction with the current (stable) code.
This patch is not only about doubling right margins, but also removing the substraction of left/top margins for left/top bounds.

@scottgonzalez
Copy link
Copy Markdown
Member

Thanks, can you send a pull request with your updated patch?

@ghusse
Copy link
Copy Markdown
Contributor Author

ghusse commented Mar 8, 2011

Updated with the right/bottom margin ? Yep

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants