drag-and-drop

How to drag images from a listview (together with an imageview) to pictureboxes?

孤者浪人 提交于 2019-12-13 04:08:41
问题 I am pretty new to C# and struggle a lot with a small project I want to do. I am busy with something like a collage maker where I have a list of pictures on the left hand side and I want to drag and drop multiple images to the right hand side where I want to be able to move them around to create my collage. I wanted to show an image but I am not allowed to post images with less than 10 reputation points. But look here for the image: I can't manage to get it to work. I've looked online for

drag image after dropping it in canvas element

不问归期 提交于 2019-12-13 04:02:19
问题 To perform drag & drop functionality, with canvas element, I have to actually draw the image in the element of destination using this line, ctx.drawImage(imgElement,dropX, dropY); Because it's drawed, I found a difficulty in dragging it again. It's like I can't make it move anymore I'm working on the basis of this code here : http://jsfiddle.net/m1erickson/cyur7/ What modifications do I have to make, in order to drag again a dropped image? 回答1: Keep in mind that canvas is just a bitmap. Once

document.elementFromPoint(x, y) isn't reporting correct child elements

落爺英雄遲暮 提交于 2019-12-13 03:49:25
问题 According to this answer, I should be able to get the element that an element "drop" occurred over. However, it's reporting really odd and random results which always seems to be parent elements instead of the actual child element the dragged element is dropped on. Here's the FULL CODE EXAMPLE on CodeSandbox with the pertinent snippets shown below... <div> <div id="sidebar"> <drag :transfer-data="{ type: 'textbox', width: 330, height: 50 }" class="draggable-item" >Textbox <div slot="image"

HTML 5 drag and drop How to figure out whether an element accepts a drop

假如想象 提交于 2019-12-13 03:44:05
问题 HTML5 drag and drop, trying to work out whether to allow a drop on an element. So according to this : http://dev.w3.org/html5/spec-preview/dnd.html#dndevents You cannot read the DataTransfer dataStore on dragover. Since dragover is the event you are supposed to cancel to indicate that you accept a drop - and given that during dragOver you cannot tell what is being dragged, how is this supposed to work ? I am missing something obvious here ? It seems to be that you must cancel dragover

Safari. Wrong cursor when dragging [duplicate]

时光毁灭记忆、已成空白 提交于 2019-12-13 03:38:39
问题 This question already has answers here : chrome sets cursor to text while dragging, why? (8 answers) Closed 2 years ago . I'm trying to add drag-and-drop functionality to my project and using slip.js for this. To decorate cursor I've add class="draggable" to each draggable <tr> . The CSS for this class is: .draggable:active { cursor: -webkit-grabbing; cursor: -moz-grabbing; cursor: grabbing; } Drag-and-drop works fine, but in Safari when I'm dragging a table row the cursor looks like cursor:

PySide: How to snap a button into a place when I drag it?

微笑、不失礼 提交于 2019-12-13 03:09:43
问题 I have an application where I am able to drag buttons around freely in a window. I want to have a section of the window with slots in which I can drop the button into. If I drop it in the vicinity of one slot, I want the button to lock in place in that slot. I only want to move the buttons in the Y direction. How would I go about implementing the slots? I am picturing something simple like a bookshelf. Edit: I've added code that implements 5 movable labels. What I am trying to do is to be

How to change elements being copied on dragging using Dragula JS Plugin

。_饼干妹妹 提交于 2019-12-13 02:45:10
问题 I have a page which is similar to page builder template editor. Im using Dragula.JS as a plugin for drag and drop and used their method copy to copy elements from other container. This is what it looks like: The problem is when I drag from right side columns and put in the left box elements are copied exactly what it is on the right columns. This is my code: <div id="2col" class="collapse column-choices"> <a href="#" class="list-group-item"> <div class="row"> <div class="layoutBorder one-half

Drag and drop files to be uploaded when the form is submitted

我与影子孤独终老i 提交于 2019-12-13 02:40:59
问题 I'm trying to implement drag-and-drop file selection for uploading files synchronously once the form is submitted. I know how regular file uploading works with HTML and PHP. And I want to be able to process the files in PHP alongside the ones in the $_FILES array. I've done some research and looked at several plugins but pretty much all of them either upload files once they're dropped into the window or don't use conventional html forms. Any kind of help like ideas, snippets or plugins would

jQuery UI sortable connected list item snaps to second last position

霸气de小男生 提交于 2019-12-13 02:38:12
问题 I have two sortable lists next to each other. See this example: http://jsfiddle.net/2Fbt6/ If you drag "Item 6" to the right, it gets added to the second last position instead to the last. If you drag "Item 6" to the right, to the left, and again to the right, it's correct. Code: HTML: <div class="categories"> <ul class="items"> <li id="item1" class="item ui-state-default">Item 1</li> <li id="item2" class="item ui-state-default">Item 2</li> <li id="item3" class="item ui-state-default">Item 3<

How to drag and drop directory and get only the path of it? [closed]

走远了吗. 提交于 2019-12-13 02:26:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . How can i drag and drop directory in windows and get the path of the directory - that is in order to not to write the path by myself all the time ( sometimes its really long ). I tried to look for a solution but couldn't find as most drag and drop that relate to directory or files