Reputation: 75
I'm trying to disable the draginitiator, that's the semi-transparant object when you drag something. Does anyone know how to do this?
EDIT Code
<s:List id="dg_ads" top="75" bottom="0" width="100%" borderVisible="false"
dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"
dragComplete="dg_ads_dragCompleteHandler(event)"
doubleClickEnabled="true" doubleClick="dg_ads_doubleClickHandler(event)"
contentBackgroundColor="#FFFFFF">
<s:layout>
<s:TileLayout useVirtualLayout="false" clipAndEnableScrolling="false"
horizontalGap="5" verticalGap="5" />
</s:layout>
</s:List>
Upvotes: 1
Views: 557
Reputation: 13620
Create a custom list class that extends spark List and override createDragIndicator() method.This is method is used by the DragManager to create the dragProxy(The image you will see when a drag operation is in progress).
override public function createDragIndicator():IFlexDisplayObject
{
var dragIndicator:UIComponent;
dragIndicator = new UIComponent();
dragIndicator.width = 0;
dragIndicator.height = 0;
return dragIndicator;
}
Use the custom list instead of spark List in your application
Upvotes: 1
Reputation: 8050
From this question:
Try:
event.dragInitiator.visible = false;
or create your own version of the DragProxy
class and remove the portions you don't want.
Upvotes: 0