EasyUI Forum
April 30, 2024, 01:43:31 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [ASK] Draggable overflow scroll  (Read 12086 times)
budimanlai
Newbie
*
Posts: 6


View Profile Email
« on: January 18, 2014, 08:54:31 PM »

Hi All,

I have a tree and 1 div container for drag and drop. the node can drag and drop to this container.
after the node drop to container, it will change to div box (have a table name, list of fields, list of primary key, etc). we can drag this box also inside div container.
the problem is if i move (drag) div box and the div box area through div container area, the div container not show scrollbar.

my question is how to make jeasyui draggable like jquery-ui draggable.

example:
http://jqueryui.com/draggable/ --> choose "default functionality"
you can drag the box and if the box through the container, the container automatically show scrollbar.

sorry for my bad english Cheesy

regards,
Budiman
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 19, 2014, 07:41:11 AM »

Add 'position:relative;overflow:auto' style to the div container and you will be able to drag a element within this container.
Code:
<div style="position:relative;border:1px solid #ccc;width:400px;height:400px;overflow:auto">
<div class="easyui-draggable" style="width:150px;height:150px;border:1px solid #ccc;background:#fafafa">
<p>Drag me</p>
</div>
</div>
Logged
budimanlai
Newbie
*
Posts: 6


View Profile Email
« Reply #2 on: January 20, 2014, 12:42:55 AM »

Add 'position:relative;overflow:auto' style to the div container and you will be able to drag a element within this container.
Code:
<div style="position:relative;border:1px solid #ccc;width:400px;height:400px;overflow:auto">
<div class="easyui-draggable" style="width:150px;height:150px;border:1px solid #ccc;background:#fafafa">
<p>Drag me</p>
</div>
</div>

Wow, cool. worked. thanks
Logged
budimanlai
Newbie
*
Posts: 6


View Profile Email
« Reply #3 on: February 07, 2014, 02:05:50 AM »

Hi stworthy,

Now, I develop some application like MySQL WorkBench which I use jeasyui for UI Layout and jsPlumb as draggable table element (every table can connect to other table and every table can draggable). jsPlumb use jQuery-UI Draggable plugins for his draggable handle.

How to combine jeasyui (draggable) with jsplumb (draggable)?

Regards,
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!