wcx6298 / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

Unable to Drag and Drop Draw Items #690

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1)Create any Draw Item. Lets say "DrawTriangle". 
2)Add Drag Method for this Draw line.
           drawTriangle.setCanDrag(true);

What is the expected output? What do you see instead?
Draw item should be dragged as this method is available for Draw item. Instead, 
DnD is not happening for any of the draw item & draw group.

What version of the product are you using? On what operating system?
Smart Gwt 3.0
Windows 7 Professional

What browser(s) does this happen in?  Are there any browsers where the
issue does not occur?

Please provide any additional information below.

<Code>
public void onModuleLoad() 
    {
        final DrawPane drawPane = new DrawPane();

        drawPane.setHeight("100%");
        drawPane.setWidth("95%");
        drawPane.setShowEdges(true);

        Button button = new Button("Click");
        button.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) 
            {
                DrawTriangle drawTriangle = new DrawTriangle();
                drawTriangle.setDrawPane(drawPane);
                drawTriangle.setPoints(new Point(100,50),new Point(150,150),new Point(50,150));
                drawPane.addDrawItem(drawTriangle, true);
                drawTriangle.setCanDrag(true);
                System.out.println(drawTriangle.getCanDrag());
                drawTriangle.addDragMoveHandler(new DragMoveHandler() {

                    @Override
                    public void onDragMove(DragMove event) 
                    {
                        System.out.println("Hiiiiiiiiiiiiiii");

                    }
                });
            }
        });
}
</Code>

Original issue reported on code.google.com by rubiniku...@gmail.com on 5 Nov 2012 at 1:21

GoogleCodeExporter commented 9 years ago
This can be resolved by calling drawPane.setCanDrag(true);

Original comment by smartgwt...@gmail.com on 7 Nov 2012 at 12:28