drag-and-drop

Drag and Drop in MVVM with ScatterView

自作多情 提交于 2019-12-21 14:06:04
问题 I'm trying to implement drag and drop functionality in a Surface Application that is built using the MVVM pattern. I'm struggling to come up with a means to implement this while adhering to the MVVM pattern. Though I'm trying to do this within a Surface Application I think the solution is general enough to apply to WPF as well. I'm trying to produce the following functionality: User contacts a FrameworkElement within a ScatterViewItem to begin a drag operation (a specific part of the

Drag and Drop in MVVM with ScatterView

淺唱寂寞╮ 提交于 2019-12-21 14:02:54
问题 I'm trying to implement drag and drop functionality in a Surface Application that is built using the MVVM pattern. I'm struggling to come up with a means to implement this while adhering to the MVVM pattern. Though I'm trying to do this within a Surface Application I think the solution is general enough to apply to WPF as well. I'm trying to produce the following functionality: User contacts a FrameworkElement within a ScatterViewItem to begin a drag operation (a specific part of the

jQuery's draggable grid

喜你入骨 提交于 2019-12-21 13:09:11
问题 It looks like that the 'grid' option in the constructor of Draggable is relatively bound to the original coordinates of the element being dragged - so simply put, if you have three draggable divs with their top set respectively to 100, 200, 254 pixels relative to their parent: <div class="parent-div" style="position: relative;"> <div id="div1" class="draggable" style="top: 100px; position: absolute;"></div> <div id="div2" class="draggable" style="top: 200px; position: absolute;"></div> <div

Drag and Drop not working between 2 activities on some devices

谁说胖子不能爱 提交于 2019-12-21 12:57:38
问题 I use the following code to drag a view from an activity to another activity within my application. Knowing that the second activity (That receives drop event) is not created / alive when the drag starts. It works good on Samsung Note 3 Android 5 API 21, Samsung Note 4 Android 6.0.1 API 23 but not working on ASUS ZenPad 8.0 Android 5.1.1 API 22, Le Max 2 Android 6.0 API 23 Your thoughts are appreciated. Starting Drag operation: public boolean onItemLongClick(AdapterView<?> aParent, View aView

Javascript to Drag and Drop in HTML5

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 12:35:49
问题 Trying to do a simple drag and drop example in HTML5 - but when I drop the image into the div element I get the following error. Uncaught TypeError: Cannot set property 'innerHTML' of null So I assume the error message means dragElement is null. I don't understand why though, because I set it in the dragstart event to be the HTML of the img element. Anyone know how to make this work? var dragElement = null; $('#x').bind('dragstart', function (e) { dragElement = this; e.dataTransfer

drag and drop imageview android

一世执手 提交于 2019-12-21 12:31:59
问题 I am currently developing one game! In that there is a frame layout in that there is one HorizontalView and One in VerticalView and AbsoluteLayout and in Absolutelayout is at Top Right in that there is a ImageView Now In HorizontalView and VerticalView there is a list of dresses of images. when i click on that image the of dress will be added to the Abosolute layout.. And in imageView there is a one cartoon.. now i can drag and drop that dress into this cartoon for that XML code is

Multiple files download in Chrome using HTML5 Drag & Drop [closed]

左心房为你撑大大i 提交于 2019-12-21 12:23:21
问题 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 7 months ago . I know that it is possible to download a file in Chrome using HTML5 Drag & Drop. It is implemented in Gmail. Is it possible to download more than one file in one step using Drag & Drop and HTML/JavaScript only? 回答1: Yes. Chrome has implemented a special protocol for drag and drop

Is drag and drop supported by TreeItem?

这一生的挚爱 提交于 2019-12-21 12:00:13
问题 I'm currently working with a JavaFx-2's TreeView representing a file system. I want to enable drag and drop to allow move operations, but it looks like TreeItem doesn't include drag events listeners. I was only able to implement drag and drop on the englobing TreeView object, but it doesn't work for sub-items. Am I missing something, or are drag and drop events not supported for TreeItems yet? 回答1: Question answered by Csh on the Oracle Forums : https://forums.oracle.com/forums/message.jspa

Keep a copy of an element when using jQuery drag and drop

烂漫一生 提交于 2019-12-21 09:37:11
问题 I'm using Jquery drag and drop and I want to keep a copy of the element I'm dragging. $('.draggable').draggable({ revert: "invalid", stack: ".draggable" //helper: 'clone' }); $('.droppable').droppable({ accept: ".draggable", drop: function( event, ui ) { var droppable = $(this); var draggable = ui.draggable; // Move draggable into droppable draggable.appendTo(droppable); draggable.css({top: '5px', left: '5px'}); } }); JSFiddle So if I drag the red square to the grey box, a copy of the red

WPF drag distance threshold

只谈情不闲聊 提交于 2019-12-21 09:23:48
问题 I have a program with two WPF treeviews that allow dragging and dropping between the two. The problem is, it can be annoying to open / close items on the treeviews because moving the mouse just one pixel while holding the left mouse button triggers the drag / drop functionality. Is there some way to specify how far the mouse should move before it's considered a drag / drop? 回答1: There's a system parameter for this. If you have Point down = {where mouse down event happened} Point current =