draggable

jQuery UI's Draggable and page scrolling

ε祈祈猫儿з 提交于 2019-12-23 10:53:45
问题 I noticed when I use jQuery UI's draggable feature and I have to drag the element so far up/down the page that it forces a scroll. The element being dragged seems to jump (about) twice as fast as my mouse cursor. This causes very erratic behavior and makes it almost impossible to use. An example of what I mean can be found here. http://tinyurl.com/ae6g5qe I even get this behavior on the sample code on the jQuery UI's site. http://jqueryui.com/draggable/#scroll I have a guess that it is using

d3 v5 tree is not draggable on initialization with angular 7

十年热恋 提交于 2019-12-23 06:04:13
问题 I have encountered a weird problem i have created a D3 tree which allows me to drag only after zoom otherwise it does not.I have tried @hostListerner and event binding but those things are outside D3 event hence these events are not working properly. here is code please correct me id i am doing something wrong. Initialization of D3 tree displayTree() { d3.json("./assets/flare.json").then(data => { data = this.d3Object; this.root = d3.hierarchy(data); this.root.x0 = height; this.root.y0 = 0;

jquery strange behaviour when toggling (hiding/showing) droppable panels

早过忘川 提交于 2019-12-23 04:47:32
问题 I have several draggable/hideable boxes based on the code posted here: http://webdeveloperplus.com/jquery/saving-state-for-collapsible-drag-drop-panels/ I also have an area with a list of blocks which I can drag into any one of these boxes, and then sort them. This works fine. It's only when I start toggling these boxes, or moving their positions, that things start going weird. Example 1 Let's say I have 3 boxes stacked vertically: Box1 Box2 Box3 Block can be dragged into (and sorted) ok. If

jQuery draggable sortable, changing html on dropped element

血红的双手。 提交于 2019-12-23 02:39:24
问题 I'm designing a form-building interface. All available fields will be in an unordered list on the left of the interface, with a large, empty unordered list on the right which will become my webform. The "trick" to making this interface work is having the list items from the left transformed into valid html elements by appending html into the droppable ui element just before they are appended into the sortable list on the right. I have it working...mostly...using draggable() and sortable().

dragula JS move from one list to another with on click event

末鹿安然 提交于 2019-12-23 02:02:33
问题 Im using Dragula JS for the drag and drop functionality and I would like to also have the option to move back and forth the elements in my list with the mouse click without loosing the drag and drop functionality.. How can I achieve this? so I click on element 1 and it moves to the list. I click it back from that list and it moves back. That's the idea. I prepared a fiddle with the basic drag and drop if it helps. http://jsfiddle.net/vf6dnwxj/10/ my structure in the fiddle above: <div class=

how to make a div slide into position

回眸只為那壹抹淺笑 提交于 2019-12-23 00:51:11
问题 i have a div and within that one is multiple divs that are draggable, so how do i make so when the user drags the first div the remaining ones slide into it's place thanks 回答1: ADD Draggable and sortable http://jqueryui.com/demos/draggable/#sortable 来源: https://stackoverflow.com/questions/6439686/how-to-make-a-div-slide-into-position

Is it possible to have a Jquery Draggable object under an other div

邮差的信 提交于 2019-12-22 17:55:17
问题 I'm attempting to create a template system where an uploaded jpg is then placed on a template. Test example: http://www.silverink.com/TEMP/jqueryTest/ The problem is that I want to have a mask on the top most layer but be able to click and drag the lower layer. At present I'm having to either click the area to bring it to the fore then drag or have it at the fore transparent. Any ideas or suggestions most welcome!! 回答1: There is actually an easy way: create the draggable as usual for the

Highlighting table cells for a single row on mouse drag

笑着哭i 提交于 2019-12-22 10:12:10
问题 What I am trying to do is allow the user to highlight cells in a table when they drag the mouse over them, very much as outlined in the question and answer Select Cells On A Table By Dragging What I need to do though is restrict the drag / highlight effect from spanning more than one column. e.g. which ever column the user start the drag event in they cant highlight out side that column. Anyone have any ideas on how to achieve this? 回答1: Taking the example that is in the other question, you

How to make dynamically added list elements draggable in jquery?

核能气质少年 提交于 2019-12-22 09:05:24
问题 Here is my code from http://jsfiddle.net/XUFUQ/1/ $(document).ready(function() { addElements(); } ); function addElements() { $("#list1").empty().append( "<li id='item1' class='list1Items'>Item 1</li>"+ "<li id='item2' class='list1Items'>Item 2</li>"+ "<li id='item3' class='list1Items'>Item 3</li>" ); } $(function() { // there's the gallery and the trash var $gallery = $( "#list1" ), $trash = $( "#list2" ); // let the gallery items be draggable $( "li", $gallery ).draggable({ cancel: "button"

is there a way to make divs not overlap eachother while dragging via jquery draggable [or etc..]?

倖福魔咒の 提交于 2019-12-22 05:23:22
问题 is there a way to make divs not overlap eachother while dragging via jquery draggable()? i have a bunch of divs that user can drag around but i can not have them overlap eachother. basically i'm creating a canvas where user can freely move the site's contents around the site but it needs to not overlap the other content while moving them. any ideas? 回答1: You can try jquery-collision plus jquery-ui-draggable-collision. Full disclosure: I just wrote and released these on sourceforge. The first