drag-and-drop

kineticjs drag & drop - no release inconsistency

拈花ヽ惹草 提交于 2019-12-12 03:44:38
问题 First of all drag and drop works correctly in my stages in version 4.3.0, so I just want to understand why I get the following problem with 4.3.3. I have three stages. One sits in a container in a document in an iframe. The others sit in containers in the iframe's parent document, one displaying a complex layout of shapes and the other a single simple shape for testing. The document in the iframe which controls all the action has a viewfinder overlay that drags and drops correctly. However

angular-drag-and-drop-lists items in separate container

强颜欢笑 提交于 2019-12-12 03:26:43
问题 I use the angular-drag-and-drop-lists directives to handle drag and drop operations. I populate groups separated from the actual items. Problems occurs when I drag the item onto the ul element, item disappears. Here is a link to a plunker for you to be able to see what I mean. Below is my code: <ul ng-repeat="group in groups" class="groups" dnd-list="items"> <li class="title">{{group.name}}</li> </ul> <ul class="items"> <li class="item" ng-repeat="item in items" dnd-draggable="item" dnd-moved

data from sqlite into ArrayList<String>

孤人 提交于 2019-12-12 03:18:04
问题 i am using code this blog to have a draggable list. This tutorial is using a custom DragNDropAdapter that takes the content as an ArrayList. In my listActivity i query a table with returned column name .It has 11 values inserted. i tried to convert it to ArrayList from String[] with many ways such as : String[] from = new String[]{DbManager.KEY_NAME}; ArrayList<String> content = new ArrayList<String>(); for (int i=-1,l=from.length; ++i<l;) { content.add(from[i]); //Log.i("ArrayList", from[i])

How to drop texts and images on a canvas? (Firefox 41.0.1)

自闭症网瘾萝莉.ら 提交于 2019-12-12 03:16:12
问题 The following code should output 'hello' in the console, when I mark either the text "Canvas" or the image "testimage.png" and drag and drop it on the canvas. But it doesn't work. When I add the eventListener to a textarea, it does work. But it really should be on the canvas. :/ I do not assume it is not possible. How to do it? (The html file is on my domain, and the image file is on the same domain in the same directory.) <html><head> <script type="application/javascript"> function someInits

Protractor Drag And Drop

一笑奈何 提交于 2019-12-12 02:59:13
问题 I have a list of elements so i want to write a function to drag those elements into a container that builds up an object. At the moment in my protractor tests I have found the element. The element is present and is displayed. The only place I'm running into problems is when I try to translate or drag and drop its position on the screen. At the moment i'm using browser.actions().dragAndDrop(element1.getWebElement(), { x: -500, y: 20 }).perform(); In order to try drag it -500px to the left and

Is it possible to start drag on mousePressed using java Swing DnD api?

試著忘記壹切 提交于 2019-12-12 02:53:01
问题 In the example below there is a standard way to trigger drag and drop, which is mousePress+mouseMove. import javax.swing.*; import java.awt.datatransfer.StringSelection; import java.awt.dnd.DnDConstants; import java.awt.dnd.DragGestureListener; import java.awt.dnd.DragSource; public class DndExample extends JFrame { public static void main(String[] args) { SwingUtilities.invokeLater(() -> new DndExample()); } public DndExample() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel

iOS - UIPanGestureRecognizer : drag during animation

僤鯓⒐⒋嵵緔 提交于 2019-12-12 02:39:15
问题 i use UIPanGestureRecognizer to move an object along the path drawn by the user. But this object is animating and i need to interact with it during animation. Is it possible? I already try to use UIViewAnimationOptionAllowUserInteraction but no results. 回答1: Yes it is possible. But I would use CABasicAnimation for animating the object and not the UIView animationWith... and then add the UIPanGestureRecognizer to the object. So some example code: // Configure the animation and add it to the

How to check for IE Drag & Drop support of any element

爷,独闯天下 提交于 2019-12-12 02:39:02
问题 Is there a way to check if a user agent supports drag & drop of a particular element (div, tr,...)? I've got a table with draggable table rows, which works fine in Chrome. But since Internet Explorer (up to version 9) only supports dragging of images and links (and a few others), I wanted to give it a little anchor drag handle inside the table row instead. My code looks something like this: <table> <tr draggable="true"> <td><a class="drag-handle"></a> Hello World</td> </tr> </table> JS/jQuery

HTML5 audio player drag and drop

杀马特。学长 韩版系。学妹 提交于 2019-12-12 02:33:17
问题 I'm implementing audio player in html5, which has drag-drop option for load and play mp3 files, but I have problem with plaing the file. When the file is dropped on the area, I can see in the console properties of object, but there is no information about absolute path, because of security in web browser. Is there an option, how to play mp3 this way ? index.html and body content: <div style="border: 1px solid black; width: 200px; height: 50px; padding: 10px;"" id="cudl">add file here</div>

why if statement with e.preventDefault ? - drag and drop javascript

梦想与她 提交于 2019-12-12 02:27:12
问题 I'm following this example to make a javascript html5 DnD (drag and drop): http://www.html5rocks.com/en/tutorials/dnd/basics/ To prevent the default behavior for some browsers the default event is prevented. I understand the need. But why is there also an if statement? function handleDragOver(e) { if (e.preventDefault) { e.preventDefault(); // Necessary. Allows us to drop. } // Why this if statement?, To me it seems double: if it is already there (if true), do it again...? Thanks for anyone