Questions tagged [drag]

In computer graphical user interfaces, drag is the first phase of a drag-and-drop operation. This involves selecting a virtual object by "grabbing" it and dragging it with the mouse down to a different location or onto another virtual object. An instance of some object relating to what was grabbed is usually brought with the drag operation.

In computer graphical user interfaces, drag is the first phase of a drag-and-drop operation. This involves selecting a virtual object by "grabbing" it and dragging it with the mouse down to a different location or onto another virtual object. An instance of some object relating to what was grabbed is usually brought with the drag operation.

2133 questions
21
votes
2 answers

iOS drag on UIView, cloth effect

Since I saw this menu drag concept, I have really been interested to find out how to accomplish it. So I am wondering how I would go about dragging with a cloth-effect in a UIView? I know how to drag items, but how do you give them the ripple…
Paul Peelen
  • 10,073
  • 15
  • 85
  • 168
20
votes
1 answer

Drag Event vs Mouse events for Drag and Drop

Recently I started to learn Drag and Drop API and was going through some tutorial on Youtube starting with this which was pretty good, Understood the whole Drag Cycle. But I saw some other tutorials which were not using drag but the drag feature…
Anurag P
  • 337
  • 3
  • 11
20
votes
1 answer

Dragging a Div in jQuery - fine when mouse is slow, but fails on fast mouse movement

I want to drag a div around using my own jQuery code. This example on jsfiddle works fine when the mouse movements are slow http://jsfiddle.net/craic/kr7Un/ But any fast movement pulls the mouse out of the box and the tracking is lost. jQuery UI…
craic.com
  • 3,786
  • 5
  • 22
  • 17
20
votes
2 answers

ViewDragHelper: how to use it?

In the Google IO 2013, Google has announced a new version of the Support Library, which includes ViewDragHelper class. I saw the docs, but I couldn't find any sample of usage for this class. For example, a very typical situation: I have a custom…
bvitaliyg
  • 3,155
  • 4
  • 30
  • 46
18
votes
2 answers

How to mock DataTransfer with Jest

I have some React components where I use the HTML Drag interface. In particular, I listen to dragover events on one component and set x and y positions with the DataTransfer object. Then, I listen to dragleave events on a different component and…
jackdbd
  • 4,583
  • 3
  • 26
  • 36
18
votes
4 answers

Creating OnDragListener for Google Map v2 Fragment

I’m trying to setup an onDrag Listener for a google map fragment, but can’t get the drag event to fire. Since the map doesn't support drag events directly, I'm trying to implement a drag listener for the View. I know about the onMarkerDrag event,…
Tim
  • 361
  • 1
  • 2
  • 8
17
votes
3 answers

Touch and drag image in android

I am working on some example in which i want to drag the image corresponding to touch in Android. Does anybody have an idea about how I can do it?
dharmendra
  • 7,835
  • 5
  • 38
  • 71
16
votes
5 answers

Drag a WPF Form around the desktop

i am trying to make a c# WPF form where i can drag it around the screen by clicking on it and moving with the mouse. the forms characteristics include being completely transparent and containing only one image. This being said the window style is…
Grant
  • 11,138
  • 32
  • 94
  • 140
16
votes
3 answers

ios simulator: simulate swipe and drag

I have a UIView within a UIScrollView. When i want to simulate the drag event on the UIView, swipe event on the UIScrollView is being triggered. As per the documentation , there isn't much of a difference between swipe and drag. Swipe 1- Place the…
Srisa
  • 967
  • 1
  • 7
  • 17
16
votes
1 answer

Drag down formula and change ROW references instead of COLUMNS

In excel I have sheet1 contains total every month. (please see image below) Then in my sheet2 it will display horizontally. (please see image below) I used the formula =Sheet1!$B$1, my problem is when i drag it to the right it increments the…
rayncorg
  • 963
  • 4
  • 16
  • 33
16
votes
3 answers

Mouse click and drag Event WPF

I am developing an analog clock picker control. The user is able to click on the minute or hour hand and drag to turn the needle to select the specific time. I was wondering how to detect such a click and drag event. I tried using…
Ji yong
  • 433
  • 2
  • 5
  • 12
15
votes
3 answers

JavaScript Drag & Select functionality done right

I'm trying to write a drag & select functionality using HTML & JavaScript. By that I mean that there will be a set of objects with arbitrary absolute positions. I want to be able drag the cursor over the area where they are laid out. Think of it as…
julx
  • 8,694
  • 6
  • 47
  • 86
15
votes
5 answers

Drag objects in canvas

Im looking for an easy to use method of assigning drag behavior to multiple objects (images, shapes etc) in canvas. Does anyone have a good way or know of any libraries for dragging objects around? Thanks
Rigil
  • 539
  • 4
  • 9
  • 13
15
votes
1 answer

Drag & Drop - DataTransfer object

I'm building a simple drag n' drop uploader and I'm wondering why I can't see the file(s) I drop when I console.log(e) (DragEvent) and look at the DragEvent.dataTransfer.files it shows up empty, but... if I console.log(e.dataTransfer.files) it will…
Jordan Davis
  • 1,485
  • 7
  • 21
  • 40
15
votes
2 answers

Drag object in Unity 2D

I have looked for an object dragging script for Unity 2D. I have found a good method on the internet, but it seems it's just working in Unity 3D. It's not good for me as I'm making a 2D game and it's not colliding with the "walls" in that way. I…
Zwiebel
  • 1,605
  • 4
  • 21
  • 37