Restyle drag-and-drop panel
[potlatch2.git] / net / systemeD / potlatch2 / panels / DragAndDropPanel.mxml
index 8b0a91cbf8613dabd53a9cefc42f0761cc071007..3483414b79f30b12ac4a335a232e3e5ccbef42be 100644 (file)
@@ -26,6 +26,8 @@
                                </fx:Component>
                        </mx:itemRenderer>
                </mx:TileList>
+
+               <mx:VBox width="100%" height="5"/>
        </mx:Repeater>
 
        <fx:Script><![CDATA[
@@ -48,6 +50,8 @@
        private static const MINIMISED:uint=0;
        private static const MAXIMISED:uint=1;
        private static const TOO_SMALL:uint=2;
+       private static const ICON_WIDTH:uint=24;
+       private static const ICON_HEIGHT:uint=24;
 
        /** Start POI drag-and-drop. */
        private function mouseDownHandler(event:MouseEvent):void {
 
                var dragProxy:Image = new Image();
                dragProxy.source = item.dndimage;
-               dragProxy.width = 24;   // must set width and height explicitly
-               dragProxy.height = 24;  // for non-embedded images
+               dragProxy.width = ICON_WIDTH;   // must set width and height explicitly
+               dragProxy.height = ICON_HEIGHT; // for non-embedded images
 
                DragManager.doDrag(dragInitiator, dragSource, event, dragProxy);
+               TileList(event.currentTarget).selectedItem=null;
        }
 
        /** Handle user's click on show/hide label. */