qasta / gwt-diagrams

Automatically exported from code.google.com/p/gwt-diagrams
0 stars 0 forks source link

Why is there difference of running speed between example and my case? #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by tora...@gmail.com on 13 Jan 2010 at 5:01

GoogleCodeExporter commented 9 years ago
Source code is like below:
public class Xxxx implements EntryPoint {
    public AbsolutePanel area = new AbsolutePanel();
    public void onModuleLoad() {
        area.setWidth("500");
        area.setHeight("500");
        RootPanel.get().add(area);
        // elements to connect
        Widget x = new Label("XXXXXXXXX");
        Widget y = new Label("YYYYYYYYY");
        area.add(x, 100, 100);
        area.add(y, 200, 200);
        // gwt-diagrams stuff        
        Connector c1 = UIObjectConnector.wrap(x);        
        Connector c2 = UIObjectConnector.wrap(y);        
        Connection connection0 = new RectilinearTwoEndedConnection(c1, c2);
        connection0.appendTo(area);

        DragController dragC = createDragController();
        dragC.makeDraggable(x);
        dragC.makeDraggable(y);
    }

    protected DragController createDragController() {
        PickupDragController dragController = new PickupDragController(
                area, true) {
            public BoundaryDropController newBoundaryDropController(
                    AbsolutePanel boundaryPanel, boolean 
allowDropping) {
                return new BoundaryDropController(boundaryPanel, 
allowDropping) {
                    public void onMove(Widget reference, Widget 
draggable,
                            DragController 
dragController) {
                        super.onMove(reference, draggable, 
dragController);
                        UIObjectConnector c = 
UIObjectConnector
                                .getWrapper
(draggable);
                        if (c != null) {
                            c.update();
                        }
                    }
                };
            }

            public void makeDraggable(Widget widget) {
                super.makeDraggable(widget);
                DOM.setStyleAttribute(widget.getElement
(), "position",
                        "absolute");
                DOM.setStyleAttribute(widget.getElement
(), "zIndex", "100");
            }
        };
        return dragController;
    }
}

-----------------------------------------------
Among the any version of GWT-dnd, GWT-code, app-engine versions, I cannot find 
application running as fast as example's posted here.
Am I missing something?

Original comment by tora...@gmail.com on 13 Jan 2010 at 5:04

GoogleCodeExporter commented 9 years ago
Dragging connector object is really slow ;(

Original comment by tora...@gmail.com on 13 Jan 2010 at 5:04