Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop inside other layouts does misplace drop at end of components #58

Open
a-schild opened this issue Apr 15, 2016 · 4 comments
Open

Drop inside other layouts does misplace drop at end of components #58

a-schild opened this issue Apr 15, 2016 · 4 comments

Comments

@a-schild
Copy link
Contributor

When the components which are placed inside a DDxxxLayout are themself containers, the drop can be done inside such a layout.
The result is then, that the droped component is placed at the end of the layout and not in the place of the drop.

Here a example screenshot where the DDCssLayout is used, and the components to drag&drop are VerticalLayouts with two button on them.

As long as we drag it over the VerticalLayouts it works fine, but when the drop indicator shuffles inside the VerticalLayouts things get messy.

Sample code with the default DefaultCssLayoutDropHandler drop handler active

    private class DragComponent extends VerticalLayout
    {
        public DragComponent(int i)
        {
            setMargin(true);
            setHeight(10, Unit.EM);
            setWidth(10, Unit.EM);

            Button button1= new Button("Panel "+i);
            addComponent(button1);
            Button button2= new Button("Button2");
            addComponent(button2);
        }
    }

mozilla firefox_2016-04-15_15-54-36

@aheintz
Copy link

aheintz commented Apr 27, 2016

I'm having the same problem. I've grouped a few components in a CssLayout which I want to drag and drop as a single item. But dragging over other components composed the same way shows that the drop can be shown within that component. Tried getting around the problem using the AcceptCriterion.accept() but am not able to distinguish between a correct placement and one within subcomponent.

@a-schild
Copy link
Contributor Author

a-schild commented May 2, 2016

The fix mentioned above is specific for the DDCssLayout, but I think most other DD layouts would need a similar fix too...

@Charrey
Copy link

Charrey commented Mar 7, 2022

Is there any chance this will still be fixed? I am having the described problem.

@a-schild
Copy link
Contributor Author

a-schild commented Mar 7, 2022

The Issue is open since almost 6 years now.
Since Vaadin 8 is now out of normal support, I don't expect anything here.
But since you have the full source code... ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants