drag-and-drop

Drag an image on another image and save it to one image (like light augmented reality)

醉酒当歌 提交于 2020-01-04 02:07:30
问题 i´m wondering how can i realize this? I want to have an bigger image in the background and be able to drag and drop a smaller image to the position i want on the bigger image and save it finally, so it becomes one. Is this possible with javascript & html5? appreciate any ideas! thanks 回答1: Yes, when you have your images in position: Create a canvas element the size of the background image Draw your background image into it Iterate through your images and record positions Draw each image by

Exchange position of cells by gesture

随声附和 提交于 2020-01-04 01:53:16
问题 I have UICollectionView in which I have a prototype cell and UIImageView in it.I am displaying random images in UICollectionView . Now I want to exchange position of UIImageView by swiping it to near cell.I have tried swipe gesture and long press gesture.Code is given below which I have done: - (IBAction)LongPress:(UILongPressGestureRecognizer *)sender { if (sender.state != UIGestureRecognizerStateEnded) { return; } CGPoint p = [sender locationInView:self.collectionView]; NSIndexPath

C# PropertyGrid drag drop

拜拜、爱过 提交于 2020-01-03 19:17:14
问题 I'm trying to implement drag/drop support to a propertygrid in C# using VS2005 (.NET 2.0). The propertygrid can handle the dragenter etc. events, but there doesn't seem to be a way to get the griditem under the pointer during a drag event. The best I've been able to get so far is to use the selectedgriditem property to retrieve a custom propertydescriptor and set the value, but this requires a grid item to already be selected before starting the drag/drop operation. Has anyone had any luck

Can I drag items from Outlook into my SWT application?

帅比萌擦擦* 提交于 2020-01-03 13:31:10
问题 Background Our Eclipse RCP 3.6-based application lets people drag files in for storage/processing. This works fine when the files are dragged from a filesystem, but not when people drag items (messages or attachments) directly from Outlook. This appears to be because Outlook wants to feed our application the files via a FileGroupDescriptorW and FileContents , but SWT only includes a FileTransfer type. (In a FileTransfer , only the file paths are passed, with the assumption that the receiver

How to restrict drag (disable) in the block?

对着背影说爱祢 提交于 2020-01-03 06:03:09
问题 How to restrict drag (disable) in the block? Full example <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function(){ var x = 0, setElementMove = 0, getElementMove = $('#drag'); getElementMove.mousedown(function(event){ x = event.clientX+$(document.body).position().left-parseInt($(this).css('left')); setElementMove = true; if(typeof event.preventDefault != 'undefined'){ event.preventDefault();

Unity Drag and Drop

你离开我真会死。 提交于 2020-01-03 05:20:33
问题 How to make a C# drag and drop (for Prefab) script in Unity? Using Event System or any other way? 回答1: You can use UnityEngine.EventSystems.EventTrigger (EventTrigger component) to catch some events like OnDragStarted, OnDrag, OnDragEnded, etc. Firstly, you need to set this component to object from witch you want to start drag (for example building icon in strategy game). Then set events to some functions, that's implements movement of icon and building placement. Secondly, you need to

Remove button for drag and drop shopping cart using jquery

徘徊边缘 提交于 2020-01-03 03:27:04
问题 I am new to jquery.I am presently developing a website as a part of my project.I am able to drag and drop the products in shopping cart but i am unable to add a remove button to it and also altering the total after removing the item from cart. I tried all possible ways and also saw the duplicates but it dint work for me. I there any way to do so.Plz help me. I will be gratefull to u all. http://jsfiddle.net/Vwu37/3/ HEAD <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

On Microsoft Windows, when using HTML5 drag and drop, I do see the drag icon (ghost image) when during dragging in drag and drop

百般思念 提交于 2020-01-03 03:00:54
问题 I am using HTML5 drag and drip. During drag & drop (DnD) on Windows 7, I do not see a ghost image when I am dragging an item. It affects all browsers. How do I get it to show? 回答1: You need theme services running. Here is how you do that. Start -> All Progam -> Administrative Tools -> Component Services -> Services (Local) -> Theme (Local) 来源: https://stackoverflow.com/questions/25851579/on-microsoft-windows-when-using-html5-drag-and-drop-i-do-see-the-drag-icon-gh

Drag and drop an image in WPF

你。 提交于 2020-01-03 02:48:08
问题 I'm trying to drag and drop an image from one spot on the canvas to another (should be relatively simple), but can't figure it out. The image which I want to move has the following XAML: <Image Height="28" HorizontalAlignment="Left" Margin="842,332,0,0" Name="cityImage" Stretch="Fill" VerticalAlignment="Top" Width="42" Source="/Settlers;component/Images/city.png" MouseLeftButtonDown="cityImage_MouseLeftButtonDown" MouseMove="cityImage_MouseMove" MouseLeftButtonUp="cityImage_MouseLeftButtonUp"

Prevent DataGridDragDropTarget from Showing “Drag Shadow”

我的梦境 提交于 2020-01-03 02:26:08
问题 Is it possible to prevent the Silverlight Toolkit DataGridDragDropTarget from starting a drag-action? What I whant is to use one DataGrid only as DragSource and another one only as DropTarget. And the DropTarget-only-DataGrid should not show this "StartDragShadow" when pressing and moving the mouse over an item. 回答1: Just set the AllowedSourceEffects attribute of the toolkit:DataGridDragDropTarget control to "None" : <toolkit:DataGridDragDropTarget AllowDrop="true" AllowedSourceEffects="None"