drag-and-drop

How To Move (Drag and Drop) multiple Shapes with D3

妖精的绣舞 提交于 2020-01-01 16:58:52
问题 How do I move (drag and drop) multiple shapes with d3. I tried putting some shapes in a svg and move the svg - this works but not smoothly. This is what I got so far <html> <head> <script type="text/javascript" src="d3.v3.min.js"></script> <title>Creating SVG groups with D3.js</title> </head> <body> <script type="text/javascript"> // http://tutorials.jenkov.com/svg/g-element.html d3image = d3.select("body"); svgcanvas = d3image.append("svg:svg").attr("width", 700).attr("height", 500); svg1 =

Drag-and-drop from IE 9 into my application

半腔热情 提交于 2020-01-01 16:48:51
问题 It's kind of weird issue, let me try to explain. I wrote a (dialog based) app in c++/MFC that supports drag-n-dropping. I do the following test on Windows 7 with default themes. My app is running on the screen. It is not a top window (in its z-order) or in other words it's obscured by other windows on top of it. If I begin dragging a link or just a text selection from the Chrome or Firefox web browser, first into my app's icon on the taskbar, the icon flashes and my app pops up on the screen

Javascript file dropping and reading directories - Asynchronous Recursion

允我心安 提交于 2020-01-01 15:38:07
问题 So I'm trying to create a file dropper web application. Right now, a user can drop files on the screen and I can read them, including all the files in a directory that was dropped. But, I don't know when the script is done reading the files. Some code: This first function handles a 'drop' event and will loop through each file and send it to another function that will read its contents. function readDrop( evt ) { for( var i = 0; i < evt.dataTransfer.files.length; i++) { var entry = evt

how to make UIbutton draggable within UIView?

China☆狼群 提交于 2020-01-01 11:34:30
问题 I need to drag and drop the button in my dash board i can drag and drop the button using the following code - (void)viewDidLoad { [super viewDidLoad]; [eventButton addTarget:self action:@selector(draggedOut:withEvent:)forControlEvents:UIControlEventTouchDragOutside |UIControlEventTouchDragInside]; } - (void) draggedOut: (UIControl *) c withEvent: (UIEvent *) ev { CGPoint point = [[[ev allTouches] anyObject] locationInView:self.view]; if(point.y > 22 && point.y <300) c.center = CGPointMake(237

QML drag one component as if it has the top stacking order (largest z)

▼魔方 西西 提交于 2020-01-01 10:44:27
问题 QT5.5, QML: I am using the example "Qt Quick Examples - Drag and Drop" In this example, you could see that if we drag the red tile "1", it appears under other tiles when we drag it. I don't like this effect since when we drag one item, I hope it always appears on the top of whole GUI. What I tried is: Once the mouse is pressed, we set the item's z as the largest value. And when the mouse is released, set the z to the small value (or better we could save the original value and reset it back to

QML drag one component as if it has the top stacking order (largest z)

断了今生、忘了曾经 提交于 2020-01-01 10:42:50
问题 QT5.5, QML: I am using the example "Qt Quick Examples - Drag and Drop" In this example, you could see that if we drag the red tile "1", it appears under other tiles when we drag it. I don't like this effect since when we drag one item, I hope it always appears on the top of whole GUI. What I tried is: Once the mouse is pressed, we set the item's z as the largest value. And when the mouse is released, set the z to the small value (or better we could save the original value and reset it back to

QML drag one component as if it has the top stacking order (largest z)

限于喜欢 提交于 2020-01-01 10:42:07
问题 QT5.5, QML: I am using the example "Qt Quick Examples - Drag and Drop" In this example, you could see that if we drag the red tile "1", it appears under other tiles when we drag it. I don't like this effect since when we drag one item, I hope it always appears on the top of whole GUI. What I tried is: Once the mouse is pressed, we set the item's z as the largest value. And when the mouse is released, set the z to the small value (or better we could save the original value and reset it back to

file upload using drag drop

时光总嘲笑我的痴心妄想 提交于 2020-01-01 09:38:25
问题 I want to upload and download files using drag n drop between user computer and web browser. How can I do it ASP.NET/AJAX or JS/JQuery? 回答1: Also see http://www.thebuzzmedia.com/html5-drag-and-drop-and-file-api-tutorial/ 回答2: Take a look at plupload 来源: https://stackoverflow.com/questions/4288721/file-upload-using-drag-drop

Prevent drag drop of custom mimetype to EditText

空扰寡人 提交于 2020-01-01 08:36:09
问题 I have a custom mime type which I am intending to use to drag and drop application objects within the app. This seems to be working but I'm finding that the EditText fields are also accepting the drop action. I don't want this to happen. First, I've defined the custome mime type like this: public static final String MIME_TYPE_MYNODE = "com.example.mockup/mynode"; Then, in the onTouch handler for the source object I have: @Override //------------------------------------------------------------

difference between event.originalEvent.dataTransfer.files and event.dataTransfer.files in html 5

ぐ巨炮叔叔 提交于 2020-01-01 08:33:07
问题 What is the difference between event.originalEvent.dataTransfer.files and event.dataTransfer.files ??? Because in drag and drop , second code does not work and it is undefined and i had to use first code because it works ! 回答1: jQuery does not pass the browser event object to you, it passes the jQuery event object. You can access the original untouched event object by the .originalEvent property in the jQuery event object. Then you can proceed as normal. So in code: jQuery event model: $