GWT-DnD (drag and drop) layout question

The following is when using the drag and drop library from here: http://code.google.com/p/gwt-dnd/ When placing an absolute panel inside a relative panel, it appears to disable the drag ability. A simple example: private AbsolutePanel leftPanelTree = new AbsolutePanel(); private HorizontalPanel drawingAppPanel = new HorizontalPanel(); private VerticalPanel leftPanel = new VerticalPanel(); private VerticalPanel rightPanel = new VerticalPanel(); private Label rightSideFiller = new Label("Right Side"); private Label leftSideFiller = new Label("Left Side"); private Image newImage = new Image("images/link.gif"); private PickupDragController newDragController = new PickupDragController(leftPanelTree, true); public DrawingApplication() { initWidget(drawingAppPanel); newDragController.makeDraggable(newImage); leftPanelTree.setWidth("300px"); leftPanelTree.setHeight("200px"); leftPanelTree.addStyleName("panelBorderTest"); leftPanelTree.add(newImage, 1, 1); drawingAppPanel.setWidth("100%"); drawingAppPanel.setHeight("100%"); drawingAppPanel.setBorderWidth(2); drawingAppPanel.add(leftPanel); drawingAppPanel.add(rightPanel); leftPanel.setBorderWidth(2); leftPanel.setHeight("100%"); leftPanel.setWidth("100%"); leftPanel.add(leftSideFiller); //leftPanel.add(leftPanelTree); rightPanel.add(rightSideFiller); } If, however, I add the image to RootPanel (and change the boundary panel accordingly) or add the absolute panel to the RootPanel directly then drag capability works. Am I missing something here?

以上就是GWT-DnD (drag and drop) layout question的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏