SmartGWT version: 5.0-p20150628
I have implemented drag and drop of one canvas to a HLayout.
For the drop handler I immediately cancel the drop and affect the change in another way in my application.
Here is the cancel code:
For the canvas that is being dragged I have tried two settings:
With the first set of settings the result is that the display is garbled (attached).
With the second set of settings the drag is successful with a clear display (attached).
I’m just guessing but it appears that even though I cancel the drop the canvas being dropped is still being displayed and that it’s display is transparently overlaying the canvas in the same place.
I prefer the first set of settings because it shows the item being dragged rather than just an outline like the second settings show.
What are the correct settings to accomplish what I would like to accomplish?
I have implemented drag and drop of one canvas to a HLayout.
For the drop handler I immediately cancel the drop and affect the change in another way in my application.
Here is the cancel code:
Code:
[B]private[/B] [B]void[/B] handleDropEvent(DropEvent dropEvent, AbstractTopicLayout movedTopic) { /** * This cancels the move because the move is accomplished by the code * below. The default move behavior of SmartGWT is not needed or wanted * here. */ dropEvent.cancel(); CgEditor.[I]moveTopic[/I](movedTopic.getAppTopic(), appTopicGroup, getDropPosition()); }
Code:
[B]if[/B] ([B][I]BUGGY_DRAG[/I][/B]) { setCanDragReposition([B]true[/B]); setCanDrop([B]true[/B]); setDragAppearance(DragAppearance.[B][I]TARGET[/I][/B]); setDragType(DragAndDropType.[B][I]RegisterTopic[/I][/B].name()); } [B]else[/B] { setCanDrag([B]true[/B]); setCanDrop([B]true[/B]); setDragType(DragAndDropType.[B][I]RegisterTopic[/I][/B].name()); }
With the second set of settings the drag is successful with a clear display (attached).
I’m just guessing but it appears that even though I cancel the drop the canvas being dropped is still being displayed and that it’s display is transparently overlaying the canvas in the same place.
I prefer the first set of settings because it shows the item being dragged rather than just an outline like the second settings show.
What are the correct settings to accomplish what I would like to accomplish?
Comment