3 Replies Latest reply on Aug 25, 2006 9:42 AM by stalkert

    drag and drop bug?

    Moo_ooM Level 1

      while the application get a vertical scroll bar,
      scroll it down

      and try to drag something
      that drag and drop works improperly

      and trace the event.stageX and stageY
      the value isn't right
        • 1. drag and drop bug?
          Moo_ooM Level 1
          http://140.130.204.31/Coordinator.html
          things getting clear.
          It's a bug of flex

          drag the button to over the white box and it will change color

          without scroll down
          drag and drop works good

          but scroll it down
          drag and drop fails

          please confirm this ,and I can stop trying it.
          • 2. drag and drop bug?
            Moo_ooM Level 1
            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" >
            <mx:TextArea y="10" height="153" id="console" right="10" left="10"/>
            <mx:Script>
            <![CDATA[
            import mx.controls.Button;
            import mx.events.DragEvent;
            import mx.controls.Alert;
            import mx.core.UIComponent;
            import mx.core.DragSource;
            import mx.managers.DragManager;

            private function doDragIt(event:MouseEvent):void{
            var dragInitiator:Button=Button(event.currentTarget);
            var ds:DragSource = new DragSource();
            var BtnProxy:Button = new Button;
            BtnProxy.label="B";
            BtnProxy.width=20;
            BtnProxy.height=20;
            DragManager.doDrag(dragInitiator,ds,event,BtnProxy);
            }

            private function doDragEnter(event:DragEvent){
            var target:VBox=VBox(event.currentTarget);
            target.setStyle("backgroundColor","BLUE");
            DragManager.acceptDragDrop(target);
            }

            private function doDragExit(event:DragEvent){
            var target:VBox=VBox(event.currentTarget);
            target.setStyle("backgroundColor","WHITE");
            }

            ]]>
            </mx:Script>
            <mx:Spacer x="0" y="1200"/>
            <mx:VBox id="toClick" y="211" width="50" height="50" borderStyle="solid" horizontalCenter="0" dragEnter="doDragEnter(event)" dragExit="doDragExit(event)" backgroundColor="#ffffff">
            </mx:VBox>
            <mx:Button y="223" label="B" height="20" width="20" mouseDown="doDragIt(event)" horizontalCenter="-80"/>
            </mx:Application>
            • 3. Re: drag and drop bug?
              stalkert
              I also found a bug in the drag and drop functionallity of Flex. Take a look at the follow example.

              The bug appears when the scenario occurs mentioned below:
              scenario:

              - drag (for example) the fourth object of the left panel and drop it on the right panel
              - drag from the right panel the first and third and drop it in the leftpanel
              - notice that it is possible to mix the objects in the left panel (changed their positions).

              so far, so good ...
              - then, sort the grid by clicking on 'plaats' on the left panel
              - Now, it's not possible anymore to mix te objects on the left panel.

              I hope this bug will be fixed quickly, thx in advance