drag-and-drop

GWT Simple Drag and Drop for custom widgets

穿精又带淫゛_ 提交于 2019-12-08 04:02:28
Are there any GWT gurus out there who can guide me on how to start with Drag and Drop in GWT for custom widgets. I have a build a simple tree structure by putting custom widgets inside an HTMLPanel (table rows) and want to be able to drag and drop each widget above or below other widgets but don't know where to start I am using 1.6. I need someone to guide me or point me in the right direction. thanks gwt-dnd providing easy to use drag-and-drop capabilities to Google Web Toolkit (GWT) projects. I encourage you for using this library. You can see a complete demo with source code about gwt-dnd

KineticJS dynamically change the position of an object when other object is moved

雨燕双飞 提交于 2019-12-08 04:00:24
问题 I have a vertical and a horizontal lines and a circle on my stage, trying to keep the circle centered on the corssoing of the two lines when I move either line, here is my script that does not work: var cy = 512; var cx = 512; var gy = 0; var gx = 0; var stage1 = new Kinetic.Stage({ container: 'container', width: 1024, height: 1024 }); var layer = new Kinetic.Layer(); var circle = new Kinetic.Layer(); var circle1 = new Kinetic.Circle({ x: cx + gx, y: cy + gy, radius: 140, stroke: '#00ffff',

jQuery Draggable only allowing 1 image to be draggable

送分小仙女□ 提交于 2019-12-08 03:56:54
问题 I have a page full of images, album artwork to be precise. I have added code to make it draggable and it will only allow me to drag the first image on the page. Why is this? $(document).ready(function () { $("#draggable").each(function () { $(this).draggable({ revert: function (dropped) { var dropped = dropped && dropped[0].id == "droppable"; if (!dropped); return !dropped; } }); }); $("#droppable").droppable({ drop: function (event, ui) { var AlbumToAdd = ui.draggable.data("id"); if

The type of positioning is really affecting my JavaScript

笑着哭i 提交于 2019-12-08 03:38:23
问题 I'm currently making a drag-and-drop JavaScript engine. I'm currently making a "bounding" feature, so that the drag-object is bounded by a container with the class .bound . When I make the drag-object, I also find out if it has bounds: function makeObj(e) { obj = new Object(); obj.element = e; obj.boundX = e.parentNode.offsetWidth - e.offsetWidth; obj.boundY = e.parentNode.offsetHeight - e.offsetHeight; obj.posX = event.clientX - e.offsetLeft; obj.posY = event.clientY - e.offsetTop; var

How can I drag and drop controls using a common method?

倖福魔咒の 提交于 2019-12-08 03:22:18
问题 I have the following XAML code, which creates two stack panels within a big parent Stack Panel. I would like to be able to drag each small stack panel within the parent bigStack panel. XAML <StackPanel BorderThickness="1" BorderBrush="Black" x:Name="bigStack"> <StackPanel x:Name="smallStack1" ManipulationMode="All" ManipulationDelta="objectManipulationDelta" ManipulationStarting="objectManipulationStarting"> <TextBlock Text="John Doe"/> <TextBlock Text="CEO"/> </StackPanel> <StackPanel x:Name

Kendo Ui draggable like windows desktop

£可爱£侵袭症+ 提交于 2019-12-08 02:55:38
问题 I need to simulate a desktop icon drag and drop, i do this: $(".draggable").kendoDraggable({ container: $("#desktop"), hint: function() { return $(".draggable").clone(); }, dragend: function(e) { console.log(e); console.log(e.currentTarget.attr("src")); e.currentTarget.css("top",e.y.location); e.currentTarget.css("left",e.x.location); } }); but im not sure if is a nice way and the drag roll back effect break my solution. Hava a simple way to do this with KendoUI (No Jquery UI draggable). Any

Firefox: dragstart event doesn’t fire in hyperlink’s children

走远了吗. 提交于 2019-12-08 02:45:35
问题 There is a problem handling a draggable element which is a child of a hyperlink ( a href ). Here is HTML: <a href="#" id="a">Some text <span id="span" draggable="true">and some more text</span> </a> I try to catch dragstart events for both elements in JS: var a = document.getElementById('a'); a.addEventListener('dragstart', function() { console.log('Dragging a link…'); }); var span = document.getElementById('span'); span.addEventListener('dragstart', function() { console.log('Dragging a span…

How to drag & drop items in the same ListView?

只愿长相守 提交于 2019-12-08 01:16:40
问题 Consider this is a ListView that shows files and folders, I have already wrote code for copy/move/rename/show properties ...etc and I just need one more last thing. how to drag and drop in the same ListView like in Windows Explorer, I have move and copy functions, and I just need to get the items which user drops in some folder or in other way I need to get these two parameters to call copy function void copy(ListViewItem [] droppedItems, string destination path) { // Copy target to

CKEDITOR Drag and drop plugin integration stops working after editor instance is destroyed and recreated

左心房为你撑大大i 提交于 2019-12-08 00:57:10
问题 I'm having quite a bit of trouble while trying to use CKEditor's drag and drop integration. At first, dragging and dropping into the editor works allright with dataTransfer and all. But whenever I have to destroy and recreate an instance of the editor, dragging and dropping content stops working as expected. I have modified the sample code directly from CKEditor's SDK page about DnD integration, where you can see the issue being reproduced. (I just reduced the example as to make it more

How to implement expandablelistview with Drag and Drop List Items in android

我与影子孤独终老i 提交于 2019-12-08 00:44:43
问题 I wan for the ExpandableListView with Drag and Drop of ListItems in Android,i google it but i haven't found any good tutorial or any good link for ExpanadableListView with drag and drop list item. Please suggest me where can i learn to implement drag and drop for ExpanadableListView. Any tutorial,sample code would be appreciated greatly .Help me. Thank you. 回答1: The basic idea behind drag and drop can be divided into two sections, like updating the UI and updating the data. Updating UI starts