Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Drag and Drop with overflow auto
1 Post
Drag and Drop with overflow auto

Hi all, I am trying to create a web app that will let you drag items from a left pane to a right pane. These panes must have overflow: auto on because there will definitely be more data in them than can fit in the provided space. The problem is that when overflow is set to auto, the div expands when the draggable object reaches the extents instead of the object existing outside that div while being dragged. I want to drag an item from left pane and drop on right pane target div. This is not working when using overflow:auto, as the item is going under right pane and not visible . This is my code :

LeftPane {

width: 150px;       /* optional, initial splitbar position */
margin: 10px 0px 10px 10px;
background: #ffffff;
border: #b6b6b6 1px solid;
overflow:auto;

}

 #LeftPane li.sorting {  
     float: left;  
     margin: 4px;  
     padding: 4px;  
     border: 1px solid #ccc;  
     }  

 #LeftPane li.sorting:hover {   
     float: left;  
     margin: 4px;  
     padding: 4px;  
     border: 1px solid #666;   
     cursor: move;  
     }  

/ * Right-side element of the splitter. /

RightPane {

float:right;
width:271px;
margin: 10px 10px 10px 0px;
background: #ffffff;
border: #b6b6b6 1px solid;

}

thanks, sri..

1 Post
Login to add your message