drag-and-drop

Create a div by click and drag

我怕爱的太早我们不能终老 提交于 2019-12-24 01:14:54
问题 I want to be able to create a div in my application by clicking and dragging. Clicking would initiate the div creation, while dragging would resize the div. I have seen similar functionality in several jquery calendar plugins, I want to be able to do it in my application too. Can anyone please guide me into the right direction? Any jQuery plugin or something that I am missing? Thanking you for your help. 回答1: You could following this plan: When the mouse button goes down, you record the x/y

ViewGroup throwing NullPointerException in dispatchDragEvent

≡放荡痞女 提交于 2019-12-24 00:47:31
问题 I am in the process of coding a drag and drop library for GridViews. I am almost complete...however, I am getting an annoying NullPointerException upon ACTION_DROP every now and then. It points to the ViewGroup source code, lines 1147 and 1153, saying it is getting a null pointer when trying to recycle the drag event. Some background on my process: I am basically embedding an OnDragListener into a custom adapter for a GridView. I have the user (programmer) implement an OnGetViewListener, when

JavaFX - Outlook attachments - DnD

核能气质少年 提交于 2019-12-24 00:39:19
问题 Hello i need a DnD Solution to Drag Outlook Mail Attachments to a Stackpane. JavaFX / Outlook 2010 stackpaneDragAndDropZone.setOnDragOver((DragEvent event) -> { Dragboard db = event.getDragboard(); System.out.println(db.getContentTypes()); }); Has this Output: [[message/external-body;access-type=clipboard;index=0;name="faxdoc-150217-1300-+49-206581978.pdf"], [RenPrivateItem]] How can i use this RenPrivateItem? On regular Java i got a file with this code: dropTarget.addDropTargetListener(new

e.data.GetData is always null

情到浓时终转凉″ 提交于 2019-12-24 00:25:00
问题 I am working with Visual Studio 2010, developing an Extension I need to drag and drop from a WPF TreeView in a Toolwindow onto a DSL Diagram but when I call e.data.GetData I can not get a value and want to know what I am doing wrong private void OnDragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(SqlServerTable))) { try { SqlServerTable table = (SqlServerTable)e.Data.GetData(typeof(SqlServerTable)); MessageBox.Show(table.Name); } catch (Exception ex) { MessageBox

On an ExtJS drag and drop tree using the drop or beforedrop listeners dont seem to fire

末鹿安然 提交于 2019-12-24 00:14:25
问题 I have a tree in extjs. I've added the drag and drop plugin and those function fine in the browser but I need to send the dragged and drop change to my DB correct? To do this I believe I should listen for the drop event then make an ajax call to my back end. I have a checkchange event that fires OK but a drop or beforedrop even seem to do nothing. Here is my tree's config, what am I doing wrong? todotree = { title: 'Tree Grid', width: 600, height: 400, viewConfig: { plugins: { ptype:

Drag, Drop and Clone - Flash AS3

假装没事ソ 提交于 2019-12-23 22:28:48
问题 I am a teacher trying to make a simple Flash AS3 game where students can drag any letter from a-z(movieclips) out to the middle of the stage to create words. I am a total amateur with Flash and so using code snippets, I have been successful in allowing users to drag and drop letters but what I would really like is for users to be able to drag and drop a letter leaving the original letter movieclip in place and clone a new one as many times as is necessary. Is anyone able to help me with the

jQuery Drag and Follow Mouse

眉间皱痕 提交于 2019-12-23 22:23:51
问题 I'm trying to create a two-column slideable region with a drag-bar in the center, see this Fiddle: http://jsfiddle.net/W7tGj/2/ I'm trying to avoid adding jQ-UI to the mix, so any help would be appreciated. I feel like I'm missing something simple. 回答1: First : - add container div to check mousemove <div id="content-div"> <div id="left-panel">f</div> <div id="drag-bar">f</div> <div id="right-panel">f</div> </div> Second : - add mousemove event into div container var movebar = false; $('#drag

Angular CDK drag and drop issue inside CSS flexbox

╄→尐↘猪︶ㄣ 提交于 2019-12-23 21:55:58
问题 I ran into an issue using drag and drop module from the Angular CDK. I use it inside a container div which has (among others) the following CSS properties : display: flex; flex-wrap: wrap; The flex_wrap property is here so that if the contained draggable elements don't fit in the container, they wrap into a second line and so on. As the dragging is horizontal ( cdkDropListOrientation="horizontal" ), this works fine when all elements fit in a single line, but as soon as they wrap to a second

drag and drop of table rows between two similar table in jquery with draggable and droppable

六眼飞鱼酱① 提交于 2019-12-23 21:53:31
问题 I am trying to drag a table row and to drop it in the similar table i.e, of same table structure. I am trying to implement with j query drag-gable but not able to fix it. I found few jsfiddle links $("tbody.connectedSortable") .sortable({ connectWith: ".connectedSortable", items: "> tr:not(:first)", appendTo: $tabs, helper: "clone", zIndex: 999990, start: function () { $tabs.addClass("dragging") }, stop: function () { $tabs.removeClass("dragging") } }) but here i dont have a tab for other

Is it possible to do HTML5 drag and drop in the Android browser?

这一生的挚爱 提交于 2019-12-23 20:15:11
问题 I tried to implement a simple drag and drop in the Android browser with HTML5. When I try to drag an object only the screen scrolls and I cant drag anything in it. Is there any way to do this? 回答1: here is a link that shows compatibility tables for support of HTML5, CSS3, SVG in desktop and mobile browsers http://caniuse.com/#agents=mobile 来源: https://stackoverflow.com/questions/8324789/is-it-possible-to-do-html5-drag-and-drop-in-the-android-browser