drag-and-drop

Read the contents of a “file” object?

本小妞迷上赌 提交于 2019-12-21 07:56:01
问题 So I have a "File" object (retrieved by handling file drag and drop from desktop). I can send the files to the server with ajax, and then throw them back for javascript to handle them. But is it possible to read the contents of it without doing all this? Here, play around with this fiddle. Drag any file to the box and use the variable file . I've already tried all of the methods of this object...no luck. Can you get the contents of the file you just dragged into the browser? PS: I would send

drag and drop auto scroll with multiple layout in android

我的未来我决定 提交于 2019-12-21 05:47:12
问题 "auto scroll not working very well when i drag and drop the image with multiple layout" I searched all over, but could not find a solution. i got a solution from this link: Make a scrollView autoscroll with drag and drop in Android @thehayro thanks for such a nice example. but it is working for only one layout and auto scroll is also worked. but i have more than 4-5 child layout in one linear layout and this layout is in the scroll view my layout file is like: <LinearLayout xmlns:android=

Uploading a file with FormData and multer

房东的猫 提交于 2019-12-21 05:46:13
问题 I have successfully managed to upload a file to a Node server using the multer module by selecting the file using the input file dialog and then by submitting the form, but now I would need, instead of submitting the form, to create a FormData object, and send the file using XMLHttpRequest , but it isn't working, the file is always undefined at the server-side (router). The function that does the AJAX request is: function uploadFile(fileToUpload, url) { var form_data = new FormData(); form

Drag-and-drop generation of XSLT for displaying XML as HTML?

强颜欢笑 提交于 2019-12-21 05:28:13
问题 (I've searched and browsed XSLT questions, as well as looked at Altova's product, though not yet Stylus's product.) I do not want to hear again that XSLT is complicated and difficult to hand-code. That's how HTML was when it was first popularized. (I know, apples and oranges comparison because XSLT is a processing language and HTML is just a display and meta-tagging language.) But now very few people hand-craft HTML. They just use WYSIWIG editors and get on with their (programming) lives. And

Drag and Drop in C#?

回眸只為那壹抹淺笑 提交于 2019-12-21 05:22:07
问题 How to Implement Drag and Drop Between my Program and Explorer ya windows application only 回答1: As long as you're using WinForms, it's actually very straightforward. See these two articles to get you started: Drag and Drop files from Windows Explorer to Windows Form Drag and Drop Text Files from Windows Explorer to your Windows Form Application And just in case you're using WPF, this tutorial and this SO thread should help. 回答2: There is a good article on CodeProject about how to do this:

How to test a JQuery UI Sortable widget using Selenium?

纵然是瞬间 提交于 2019-12-21 05:18:36
问题 We have a sortable list using JQuery UI Sortable that we are trying to automate using Selenium. It looks like the dragAndDrop function should work, but when we call it, the UI does not change. However if we look at the DOM with firebug, we see that the order of the list elements DID change. It seems it's just the UI that does not refresh. Any idea how to get it working? 回答1: Try dragAndDropToObject. I was just able to move things around using Se-IDE (though I suspect Se-RC would work as well)

Making a component less sensitive to Dragging in Swing

核能气质少年 提交于 2019-12-21 05:03:32
问题 A JComponent of mine is firing a mouseDragged event too vigorously. When the user is trying to click, it interprets is as a drag even if the mouse has only moved 1 pixel. How would I add a rule for a particular component that amounted to: Do not consider it a drag event unless the mouse has moved 10 pixels from the point at which is was pressed down. Note: I know it's not a system setting in my OS, since only events on that component suffer from this over sensitivity. Thank you. 回答1: I've had

html5 - drag a canvas

非 Y 不嫁゛ 提交于 2019-12-21 04:54:13
问题 I have a huge HTML5 Canvas, and I want it to work like google maps: the user can drag it and see only a small part of it (the screen's size) all the time. it renders only the part you can see on the screen. how can I do it? do you have an idea? 回答1: 2 simple steps: place the canvas inside a div container with overflow:hidden use any method to make your canvas draggable (I will use jQuery UI) To follow my method you need to go to the jQuery UI website and download any version of the jQuery UI

Get dropped elements id instead of drop target id

我是研究僧i 提交于 2019-12-21 04:33:31
问题 I am fairly new to jQuery and am stuck trying to get a dragged image elements id to append to the drop target instead of the image element itself or the drop targets id. I am using the html5 native DnD. And so far I can get the element itself to append by sending through its id with the datatransfer method in the drag function and the getdata function in the drop. Whenever I try to call that id from the drop however it gets the drop target id instead of the dragged elements. Any help would be

Get dropped elements id instead of drop target id

久未见 提交于 2019-12-21 04:33:11
问题 I am fairly new to jQuery and am stuck trying to get a dragged image elements id to append to the drop target instead of the image element itself or the drop targets id. I am using the html5 native DnD. And so far I can get the element itself to append by sending through its id with the datatransfer method in the drag function and the getdata function in the drop. Whenever I try to call that id from the drop however it gets the drop target id instead of the dragged elements. Any help would be