6 Replies Latest reply on Aug 1, 2011 1:17 PM by Flex harUI

    DragManager.showFeedback repaints cursor only on mouse move

    alex-malyga

      I set feedback for DragManager dynamically, but cursor remains the same until user moves mouse. What is the problem?

       

      private function onDragTimer(event: TimerEvent): void
      {                    
           var n: CWebbyTreeNode = variablesTree.indexToItemRenderer(prevDragOverItemIdx).data as CWebbyTreeNode;
                
           if(n && (n.treeType == CWebbyTree.SMART_FOLDER || n.treeType == CWebbyTree.WEBBY_FOLDER))
           {                         
                variablesTree.hideDropFeedback(null);
                variablesTree.selectedIndex = prevDragOverItemIdx;                    
                variablesTree.expandItem(prevDragOverItemIdx,true);          
                moveIntoFolderMode = true;                    
                      DragManager.showFeedback(DragManager.MOVE);    // Here I set feedback
           }
      }
      
      protected function variablesTree_dragOverHandler(event:DragEvent):void
      {               
           event.preventDefault();
           try 
           {                    
                idx = variablesTree.calculateDropIndex(event);
                
                if(idx == prevDragOverItemIdx)
                {                         
                     dragTimer.start();
                }
                else
                {
                     variablesTree.showDropFeedback(event);
                     
                     prevDragOverItemIdx = idx;
                     moveIntoFolderMode = false;
                     dragTimer.reset();
                }
           } 
           catch(e:Error) 
           {
                DragManager.showFeedback(DragManager.NONE);
                return;
           }     
      }