drag-and-drop

Can I use drag and drop of html5 on mobile devices with phonegap?

妖精的绣舞 提交于 2019-12-10 14:57:52
问题 I need a drag and drop to mobile devices using phonegap. I tried with jquery mobile and jquery ui + jquery touch punch but html5 is better for me. Is it possible? Thanks, Francisco //EDIT Here is a draggable image : <a href="" name="cebra" draggable="true" ondragstart="dragUser(this, event)" > <img src="Imagenes/cebra.png" alt="cebra" width="150" height="100" id="" style="background-color: #FFFFFF; display: block;" ; /> </a> and the function of javascript function dragUser(user, event) {

Drag image change while drag over grid

喜你入骨 提交于 2019-12-10 13:58:22
问题 I'm creating an instance of my custom DragObject on StartDrag: procedure TForm1.GridStartDrag(Sender: TObject; var DragObject: TDragObject); begin DragObject := TMyDragControlObject.Create(Sender as TcxGridSite); end; Lately on another grid on DragOver: procedure TForm1.SecondGridDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin Accept := False; if Source is TMyDragControlObject then with TMyDragControlObject(Source) do // using TcxGrid if

jQuery Drag-and-Drop Flickering on Hover (Webkit only)

馋奶兔 提交于 2019-12-10 13:46:36
问题 Issue I've just finished implementing a feature in which users can drag files into the browser and drop upon a supporting File Upload plugin, which processes the drop. However, in order to give users a hint that they can even drop things in the first place, I've implemented a dragover event to show a div that says something akin to "Drop Here". This, in turn, hides the div which has the "Choose File..." button, and replaces it, until the user stops dragging. But it seems, when I implement

Accepting drops on a QGraphicsScene

人盡茶涼 提交于 2019-12-10 12:56:18
问题 I'm trying to implement drag'n'drop for a QGraphicsScene . Here are the events I've overloaded: void TargetScene::dragEnterEvent(QGraphicsSceneDragDropEvent *event) { bool acceptDrag = false; const QMimeData* mime = event->mimeData(); // Is an image present? if (mime->hasImage()) { QImage img = qvariant_cast<QImage>(mime->imageData()); dragPix = QPixmap::fromImage(img); acceptDrag = !dragPix.isNull(); } event->setAccepted(acceptDrag); } void TargetScene::dropEvent(QGraphicsSceneDragDropEvent

Why my WPF application has Drag & Drop disabled (even when AllowDrop is true)?

耗尽温柔 提交于 2019-12-10 12:45:04
问题 My WPF application inhibits the Drop of files from Windows Explorer, showing a Stop-sign cursor. I've tried setting the AllowDrop property (that of the UIElement ancestor) to true on the main window and contained controls, but no luck at all, no drag-drop events are fired. Any ideas or suggestions to find the cause? 回答1: Solved! The problem was that executing my app thru VisualStudio (run/debug) prevented the interop with Windows' drag & drop mechanism. Running the App as stand-alone makes it

event.clientX showing as 0 in firefox for dragend event

让人想犯罪 __ 提交于 2019-12-10 12:33:28
问题 function move(e,obj,but){ if(typeof(obj) === 'string'){ obj = document.getElementById(obj) ; } if(typeof(but) === 'string'){ but = document.getElementById(but) ; } //elementCoord(but) ;//get the current coords of the button & elementCoord(obj) ;//the container e = e || window.event ; var mouseX = e.clientX ; var mouseY = e.clientY ; //alert('mouseX='+mouseX+', but.XCoord '+but.XCoord) ; var diffX = Math.abs(obj.XCoord - mouseX) ; var diffY = Math.abs(obj.YCoord - mouseY) ; but

Cocoa NSOutlineView and Drag-and-Drop

依然范特西╮ 提交于 2019-12-10 12:19:05
问题 I recently started another thread without an account, so I'm reposting the question here with an account so I can edit current links to the program so other users can follow this. I have also updated the code below. Here is my original question: I read the other post here on Outlineviews and DND, but I can't get my program to work. At the bottom of this post is a link to a zip of my project. Its very basic with only an outlineview and button. I want it to receive text files being dropped on

HTML disable Drop event, div box child contents overlap

∥☆過路亽.° 提交于 2019-12-10 12:17:40
问题 I followed the drag&drop tutorial online, and test it a little bit on my own. Then I realized a problem: so I dragged image1 to Box A and image2 to Box B, then i'm trying to drag image1 from Box A to Box B, the issue appears. If I drop image1 on the edge of Box B, everything works fine, both images are in the Box B, if I drop image1 on top of image2, image1 disappeared. does anyone know how to prevent this? I want box both image shows in the box no matter how I drop them. my example link:http

hooking explorer drag drop fails

依然范特西╮ 提交于 2019-12-10 12:17:13
问题 The big picuture: I am trying to inject my own own wrapper around explorer's drag n drop. My code is injected into explorer, and I try to replace the drop target with my own. In order to do this I am doing: Find all explorer windows (using EnumWindows and checking process association for each window). For each window I am running the following (do nothing) code: IDropTarget* lpDT = (IDropTarget *)GetProp(hwnds[i], L"OleDropTargetInterface"); //get existing drop target HRESULT res1 = :

How do I help prevent my users from initiating a drag accidentally in Cocoa?

橙三吉。 提交于 2019-12-10 12:17:09
问题 I have a collection view that I've subclassed that allows me to reorder the collection view items via drag and drop. My drag code that sets up the pasterboard is currently in mouseDragged: - (void)mouseDragged:(NSEvent *)aEvent { if(!dragInProgress) { dragInProgress = YES; NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard]; ... setup pboard, declare types, setData ... ... create drag image .... [self dragImage: image at: position offset: NSZeroSize event: aEvent pasteboard: