Search Results

Search found 2355 results on 95 pages for 'drag'.

Page 1/95 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • JQuery-UI Drag, Drop and Re-Drag Clones on Re-Drag

    - by amarcy
    I am using the following code to extend the JQuery-UI demos included with the download. I am trying to set up a container that the user can drag items into and then move the items around within the container. I incorporated the answer from http://stackoverflow.com/questions/867469/jquery-draggable-clone which works with one problem. <script> $(document).ready(function() { $("#droppable").droppable({ accept: '.ui-widget-content', drop: function(event, ui) { if($(ui).parent(":not(:has(#id1))")){ $(this).append($(ui.helper).clone().attr("id", "id1")); } $("#id1").draggable({ containment: 'parent', }); } }); $(".ui-widget-content").draggable({helper: 'clone'}); }); </script> div class="demo"> <div id="draggable" class="ui-widget-content"> <p>Drag me around</p> </div> <div id="droppable" class="ui-widget-header"> <p>Drop here</p> </div> When an item is dropped onto the droppable container it can be dragged one time and when it is dropped after that drag it loses its dragging capability. How do I allow for the item to be dragged multiple times after it has been added to the droppable container?

    Read the article

  • Using Native Drag and Drop in HTML 5 pages

    - by nikolaosk
    This is going to be the eighth post in a series of posts regarding HTML 5. You can find the other posts here, here , here , here, here , here and here. In this post I will show you how to implement Drag and Drop functionality in an HTML 5 page using JQuery.This is a great functionality and we do not need to resort anymore to plugins like Silverlight and Flash to achieve this great feature. This is also called a native approach on Drag and Drop.I will use some events and I will write code to respond when these events are fired.As I said earlier we need to write Javascript to implement the drag and drop functionality. I will use the very popular JQuery Library. Please download the library (minified version) from http://jquery.com/downloadI will create a simple HTML page.There will be two thumbnails pics on it. There will also be the drag and drop area where the user will drag the thumb pics into it and they will resize to their actual size. The HTML markup for the page follows<!doctype html><html lang="en"><head><title>Liverpool Legends Gallery</title><meta charset="utf-8"><link rel="stylesheet" type="text/css" href="style.css"><script type="text/javascript" charset="utf-8" src="jquery-1.8.1.min.js"></script>  <script language="JavaScript" src="drag.js"></script>   </head><body><header><h1>A page dedicated to Liverpool Legends</h1><h2>Drag and Drop the thumb image in the designated area to see the full image</h2></header><div id="main"><img src="thumbs/steven-gerrard.jpg"  big="large-images/steven-gerrard-large.jpg" alt="John Barnes"><img src="thumbs/robbie-fowler.jpg" big="large-images/robbie-fowler-large.jpg" alt="Ian Rush"><div id="drag"><p>Drop your image here</p> </div></body></html> There is nothing difficult or fancy in the HTML markup above. I have a link to the external JQuery library and another javascript file that I will implement the whole drag and drop functionality.The code for the css file (style.css) follows#main{  float: left;  width: 340px;  margin-right: 30px;}#drag{  float: left;  width: 400px;  height:300px;  background-color: #c0c0c0;}These are simple CSS rules. This post cannot be a tutorial on CSS.For all these posts I assume that you have the basic HTML,CSS,Javascript skills.Now I am going to create a javascript file (drag.js) to implement the drag and drop functionality.I will provide the whole code for the drag.js file and then I will explain what I am doing in each step.$(function() {          var players = $('#main img');          players.attr('draggable', 'true');                    players.bind('dragstart', function(event) {              var data = event.originalEvent.dataTransfer;               var src = $(this).attr("big");              data.setData("Text", src);               return true;          });          var target = $('#drag');          target.bind('drop', function(event) {            var data = event.originalEvent.dataTransfer;            var src = ( data.getData('Text') );                         var img = $("<img></img>").attr("src", src);            $(this).html(img);            if (event.preventDefault) event.preventDefault();            return(false);          });                   target.bind('dragover', function(event) {                if (event.preventDefault) event.preventDefault();            return false;          });           players.bind('dragend', function(event) {             if (event.preventDefault) event.preventDefault();             return false;           });        });   In these lines var players = $('#main img'); players.attr('draggable', 'true');We grab all the images in the #main div and store them in a variable and then make them draggable.Then in following lines I am using the dragstart event.  players.bind('dragstart', function(event) {              var data = event.originalEvent.dataTransfer;               var src = $(this).attr("big");              data.setData("Text", src);               return true;          }); In this event I am associating the custom data attribute value with the item I am dragging.Then I create a variable to get hold of the dropping area var target = $('#drag'); Then in the following lines I implement the drop event and what happens when the user drops the image in the designated area on the page. target.bind('drop', function(event) {            var data = event.originalEvent.dataTransfer;            var src = ( data.getData('Text') );                         var img = $("<img></img>").attr("src", src);            $(this).html(img);            if (event.preventDefault) event.preventDefault();            return(false);          }); The dragend  event is fired when the user has finished the drag operation        players.bind('dragend', function(event) {             if (event.preventDefault) event.preventDefault();             return false;           }); When this method event.preventDefault() is called , the default action of the event will not be triggered.Please have a look a the picture below to see how the page looks before the drag and drop takes place. Then simply I drag and drop a picture in the dropping area.Have a look at the picture below It works!!! Hope it helps!!  

    Read the article

  • Manual drag-drop operations in Flex

    - by Yarin
    This is a two-part problem: A) I'm implementing several irregular drag-drop operations in Flex (e.g. DataGrid ItemRenderer into Tree). My preference was modifying DragManager operations to meet my needs, and in fact using DragManager allows me to do everything I need, but I'm having serious issues with performance. For example, dragging anything over a many-columned DataGrid, whether the drag was initiated with DragManager.doDrag, or just using native ListBase drag-drop functionality, slows the drag movement to a crawl. Even if the DataGrid is disabled/ not listenening for any move/drag events, this happens. On the other hand, if the drag is initiated by calling .startDrag() on the Sprite, the drag is smooth and performs great over DataGrids and everything else. So part A would be: Is there a reason why .startDrag() operations work so well, while drags initiated through DragManager.doDrag suffer so badly when over certain components? B) If indeed the solution is to handle drag-drops using .startDrag(), how would I go about determining what component the mouse is over when the drag is released? In my example, my dragged object is brought up to the top level of the display list, and so is being moved around in stage coordinates. mouseMove, mouseOver events don't fire on the components I'm dragging over because the mouse is constantly over the dragged component, so I would need some sort of stage.coordinate - visibleComponentAtThatCoordinate conversion. Any thoughts on this? Thanks alot!-- Yarin

    Read the article

  • Trackpad Drag lock pissing me off with Windows 7

    - by rockinthesixstring
    This is driving me insane and I've scowered the web for two days trying to fix this. I just picked up an Apple Magic Trackpad to be used exclusively on a Windows 7 PC (not apple with bootcamp). I found a nice driver that got it working right away, but when I'm moving the cursor around the screen, often it will begin "highlighting" text, or picking up and dragging things I don't want it to. I looked in the "regedit" where people are saying there is binary that can be changed, however the driver I installed doesn't use the binary being suggested. Can anyone suggest a better driver for my situation or a way to disable the drag lock that is driving me so nuts? I don't mind not being able to lift my finger when dragging, it's a far better compromise than having the insane feature.

    Read the article

  • Drag lock crisis with Windows 7 and Apple Magic Trackpad

    - by rockinthesixstring
    This is driving me insane and I've scowered the web for two days trying to fix this. I just picked up an Apple Magic Trackpad to be used exclusively on a Windows 7 PC (not apple with bootcamp). I found a nice driver that got it working right away, but when I'm moving the cursor around the screen, often it will begin "highlighting" text, or picking up and dragging things I don't want it to. I looked in the "regedit" where people are saying there is binary that can be changed, however the driver I installed doesn't use the binary being suggested. Can anyone suggest a better driver for my situation or a way to disable the drag lock that is driving me so nuts? I don't mind not being able to lift my finger when dragging, it's a far better compromise than having the insane feature.

    Read the article

  • Click and Drag from Clickpad stops working after a while 12.04

    - by Jason O'Neil
    I've got a Samsung Notebook (NP-QX412-S01AU) with a touchpad / clickpad. I'm running 12.04 Precise. When I first log into my computer, the touchpad behaves exactly as expected and desired. The longer I stay logged in, it slowly degrades. I'll try describe it. There are 3 ways of "dragging" on this clickpad: (Physical) click and hold with one finger, and drag around while still holding it down. All with one finger. (Physical) Click and hold with one finger, then with another finger drag around to move cursor. Double tap (not a physical click) and on the second tap, hold and drag. I most naturally use option 1, but here's how it works: When I first turn on, options 1, 2 and 3 all work. After a while, only options 2 and 3 work. Later still, only option 3 works. Restarting X causes all 3 to work again. I've compared the output of "synclient" in each of the states, and there was no difference. Anybody know what to look at? Or at the very least, a command I can run to "restart" the mouse driver without restarting X?

    Read the article

  • Drag and drop fearture for a website

    - by gpuguy
    I have to design a website which will have drag and drop features for creating an e-card. So you select items from a tool box and drag and drop this item on the card area. Once you have completed the design you can publish the e-card on the web by clicking "Save and publish" button. What are the possible technologies for implementing this feature? The requirement is that the application should not degrade the performance of the website, and should not take much time in publishing once the user click "Save and publish" button.

    Read the article

  • How to drag from a background window to the front window

    - by Luis Alvarado
    Is the following I will explain possible with a key combination? Here is the image: As you can see, the terminal is the focus window (Front window) and Nautilus is in the background (Back Window). How can I grab a folder or file from Nautilus without loosing focus on the terminal (Without making the terminal go to the background and Nautilus to the front) and drop it in the terminal?. What I want is not to have to ALT+TAB again just to do this. Options like resizing the windows to fit the screen are not what I am looking for. Like in the image, we have a fullscreen window that we want it to stay like that. We can drag the terminal window around but anytime I access the background nautilus window, I should not loose focus on the terminal (It should not go to the background every time I access Nautilus). Maybe like a key combination that freezes the current focus windows positions and I can drag from background windows to background windows or background windows to the front focused one.

    Read the article

  • 13.04 gnome problem with drag and drop and text selection

    - by Laurent BERNABE
    I have an ubuntu 13.04 gnome 64 bits, but since a few days I am facing serious problem for doing simple drag an drop : in nautilus, in eclipse, in the browser. Also I can't manage to select text areas with the mouse (the only way I found is to double click on the first word, then expand selection with shift and arrows keys). I noticed that often, after having started a drag n drop, it is cancelled though I did not release the left mouse ! It is as if for each simple mouse clic : two was done ! My graphic card is an ati radeon hd 4330, and I had installed the default purposed driver. I don't know if I should give you results from some terminal commands, as I don't know which could be useful. Thanks in advance.

    Read the article

  • Python - drag file into .exe to run script

    - by PPTim
    Hi, I have a Python script that takes the directory path of a text file and converts it into an excel file. Currently I have it running as a console application (compiled with py2exe) and prompts the user for the directory path through raw_input(). How do i make it such that I can drag & drop my text file directly into the .exe of the python script? Thanks,

    Read the article

  • jQuery Drag and Drop Checking Question

    - by Kim
    i am new to using jQuery and I just want to know how I can check whether a draggable object has been removed from the droppable object. Example, i have a dog and I dragged it to a doghouse which has a lightbulb that will light up indicating that the dog is there. When i drag the dog out of the doghouse, the lightbulb should go off again indicating the dog's absence. Help me please coz I really don't have any idea how to do this. Thanks in advance. :)

    Read the article

  • LibreOffice - Can't drag and replace images [LibreOffice 3.5 and 3.6, Ubuntu 12.04]

    - by Anderxale
    My wife uses LibreOffice to create catalogues of a couple hundred items and then converts it to PDF. Man we love LibreOffice! Anyway I set up Windows-7 and Mint-14-Mate dual boot for her to ease into Linux. Today she was ready for Ubuntu and so I did a clean install on her machine. Everything was smooth but today when she tried to work she ran into an issue... She used to be able to download a folder full of images to use in her catalogues and then update her catalogues by replacing old images with new ones. It was so simple - Open an old catalogue, save with a new date, drag and drop replace images of items that no longer exist. The drag and drop process would scale the image and then crop it horizontally or vertically to fit. Now that I have installed Ubuntu 12.04 for her she can no longer replace images, it just does nothing... If she drags the image to the left or right of the original it appears next to the original so I know d&d works, unfortunately it does not resize or crop the image. I tried this on my laptop and my desktop... same thing! I then tried updating the LibreOffice to 3.6, no change. I then tried opening a virtual machine windows xp and Mint 14 on this computer and tried with 3.6 in those operating systems and it worked. Can anyone help? I have a lot of hope that there is an answer because Mint is based on Ubuntu/Debian and that distro can perform this task successfully! Sorry about writing a book....

    Read the article

  • Cannot move/drag/drop windows/items in remote VNC session

    - by hansioux
    I find it a little hard to believe that no one here has asked this question, I tried searching for it but it isn't asked, so here goes: I setup a Ubuntu desktop computer with VNC to use as a server. And use another Ubuntu desktop computer to VNC into it. The rest of the VNC works ok, but drag and drop with mouse is gone. Thus I can not move windows, or drag and drop items via VNC. I am using the default remote desktop in System - Preferences to setup my server. And use Remmina as my client. The same happens using MS Windows's VNC clients connecting to my Ubuntu desktop. I did a bit of searching on google, and there are actually a lot of reports regarding this issue. But, oddly there is no solution. There are even bug reports made for this since Ubuntu 9.10, yet here it still is in Ubuntu 11.04. There have been suggestions that the bugs is in gtk, as see in link below: http://ubuntuforums.org/showthread.php?t=1497635&page=2 libgtk2.0-0 stable(lenny) -> DnD works libgtk2.0-0 lenny-backport (libgtk2.0-0_2.18.6-1~bpo50+1_i386) -> DnD still works libgtk2.0-0 testing (libgtk2.0-0_2.20.1-2_i386) -> DnD broken please don't give answers such as "use NX", "use ssh -x" or "use x11vnc". I am aware that some people don't have this problem with x11vnc, and I have setup x11vnc before, but i can't for this setup. I am setting this up so Windows only friends/families can use it.

    Read the article

  • What technique to use when trying to drag elements around on a canvas

    - by choise
    I want to achieve two things in my java swing application: First, i need a canvas zone where i can drag elements (a rectangle or a circle) from the outside of a pane inside the canvas and place it at the position where they where dropped. also it should be possible to select an element on the canvas and move it around and drop it on another location on the canvas. what techniques would fit best to do such a job? Please leave a comment if something is unclear.

    Read the article

  • Dojo: drag and drop Stop Drag

    - by Jose L Martinez-Avial
    Hi, I'm trying to use Dojo dnd Source(1.4.2) to create an interface where I can move some objects from a Source to a Target. It is working fine, but I want to change the behaviour in order to execute a check before actually doing the D&D, so if the check fails, an error message is shown to the user, and the D&D is not made. I've tried the following example I found in a blog: dojo.subscribe("/dnd/drop", function(source,nodes,iscopy) { if (nodes[0].id == 'docs_menu'){ dojo.publish("/dnd/cancel"); dojo.dnd.manager().stopDrag(); alert("Drop is not permitted"); } } ); But it fails saying that this.avatar is null. Does anybody know how to do this? Thanks. Jose

    Read the article

  • Why do child elements cause 'dropleave' to be called (drag-n-drop file upload)?

    - by tundoopani
    I have a HTML5 drag-n-drop script that allows users to drop files in #droparea. The #droparea div has child elements that are also div elements. <div id="droparea"> <div id="showif_no_dragover">Drag files here!</div> <div id="showif_dragover">Drop the files!</div> </div> The associated javascript/jquery is: var droptarget = "#droparea"; $(droptarget).live('dragenter', dragEnter); $(droptarget).live('dragleave', dragExit); $(droptarget).live('dragover', nothing); $(droptarget).live('drop', dropGo); (Side question: should I use .live(), .on() or .bind() here?) I have created a sample jsFiddle with some additional code here: http://jsfiddle.net/PwFr9/3/ If you look at the console, you will notice that as you drag a file within #droparea, dragenter() and dragleave() are called multiple times, even though the drag is still inside #droparea. If you remove the child elements (#child1 and #child2), the problem is gone because the child elements are gone. How can I keep the child elements and prevent them from messing up the drag events? I have searched Stackoverflow and Google for hours without much help. I found this questions here at Stackoverflow: How to keep child elements from interfering with HTML5 dragover and drop events? I don't know why it works, though. I have tried placing 2 div elements on top of each other (via CSS positioning). The top-most div has the drag events attached whereas the bottom-most div has the child elements. I do not like this approach because it doesn't work with the rest of my page and does not allow mouse-click interaction with the bottom-most div. Any help is appreciated! Thank you in advance. Regards, tundoo

    Read the article

  • Windows 8 - can't drag files from Explorer and drop on applications

    - by FerretallicA
    In Windows 8 I find I can't drag files to applications like I've been able to do for as long as I can remember. Example: Drag MP3s to Winamp Drag folder full of music to Winamp Drag videos to VLC Drag txt, reg etc files to Notepad I have tried various combinations of: Running Explorer as administrator Running drop target as administrator Taking ownership of drop target application's folder Taking ownership of Explorer Changing user account to administrator Create a new user account Lowering UAC level Disabling UAC in GUI Disabling UAC in registry Running Explorer folders in a separate thread This is the last straw if there's no known proper (ie non hacky compromise) fix for this. "Little" things like this combined are a productivity nightmare and if I have to relearn so much and configure so much to get basic things done with an OS I might as well just move to Linux once and for all.

    Read the article

  • Unable to drag and drop / select multiple with mouse

    - by J. Scott Elblein
    I'm running into a perplexing issue with Windows 8 Pro x64, where randomly I'm unable to drag to select multiple files (i.e. in Explorer or Directory Opus). I've also noticed that a similar issue happens when I'm running for example Photoshop or Illustrator and can't drag to select multiple layers, or drag to do some other things in them. it happens randomly and have found no way to reliably reproduce it, but it happens VERY frequently. I have read some tips saying pressing the ESC button usually fixes the issue, but it doesn't in my case. From what I understand, it's probably due to some other process locking the drag feature somehow, but I've not found a way to tell which process is the perp; I've even tried using unlock software on files when I'm suddenly unable to drag and I'm told by it that nothing is locking it. Anyone have any ideas?

    Read the article

  • Right Drag on Mac

    - by Mafuba
    How do you perform a right-click-drag operation on Mac hardware? I know you can right click, but there does not seem to be a right click drag gesture. In my specific case I am using a MacBook Pro, and I am in a Windows environment. The question is more than just theoretical. I ask because there is functionality that uses this gesture, at least in the Windows world. For example, right now I'm trying to do a copy and rename in the TortoiseSVN repository browser. I think there are things you can do with a right drag in graphical editors like Photoshop as well. In windows you get a context menu when you right drag files. For those familiar with the software, I know I can do it in other ways; I'm not looking for workarounds to specific problems.

    Read the article

  • Odd Drag and drag bug in nested attributes Rails

    - by Senthil
    I've got this weird bug when trying to use drag and drag for two models (one nested within another). I've a category model which has many apps. In my category index page, I tried use "content_tag_for" to sort categories and apps within each category. But for some odd reason only the first element has drag, drop enabled. I can drag and drop categories all I want, but I can't drag the app in the second category, just the first category. Copy and paste gets ridiculously hopeless with HAML, so here's a Pastie instead. I made a sample app on heroku for you to check out here. Drag and drag work for both category and app, so I'm guessing it has to do something with the ul or li. Any help is appreciated. Thanks.

    Read the article

  • how to properly enable drag-and-drop in Windows 7 (with iTunes in particular)

    - by user38795
    On two computers with Windows 7 at work and at home with the same version of iTunes (10.1.0.56) at work I can drag-and-drop files into iPod, and I can not at home. At home only adding them first through a dialog box to a Library and only after that drag-and-dropping into iPod (or iPad) works. Initially I thought the problem is in iTunes, but looks like it's the same version, so most likely it's the Windows 7 config parameters. It's 64-bit W7, and I have admin privileges in both cases. The only difference I could think of is it's an enterprise version at work and ultimate at home. What should I change at home to enable that drag-and-drop-ing files into the application?

    Read the article

  • Drag and Drop File into Application under run as administrator

    - by Chris Dwyer
    Whenever I have an application running (Visual Studio 2008, Notepad, etc.) under "Run as Administrator", I cannot drag and drop files from Windows Explorer into the application. I've tried running Windows Explorer as administrator, but to no avail. Is there a way to get drag and drop to work when my applications are under "Run as Administrator"?

    Read the article

  • Right-button drag-drop function in Gnome

    - by HorusKol
    While I don't really miss the annoyances that go with working on Windows, one thing I do wish I had in Gnome is the ability to hold the right-mouse button down on a file and drag it to get the context menu asking if I want to move or copy the file. I realise the default tries to be sensible (like in Windows - defaults to move if on the same volume, or copy if on different) and that it can be overridden with <ctrl> or <shift> - but i'm still used to the right-mouse drag option and keep getting frustrated when it doesn't work...

    Read the article

  • Drag and Drop in Silverlight with F# and Asynchronous Workflows

    - by knotig
    Hello everyone! I'm trying to implement drag and drop in Silverlight using F# and asynchronous workflows. I'm simply trying to drag around a rectangle on the canvas, using two loops for the the two states (waiting and dragging), an idea I got from Tomas Petricek's book "Real-world Functional Programming", but I ran into a problem: Unlike WPF or WinForms, Silverlight's MouseEventArgs do not carry information about the button state, so I can't return from the drag-loop by checking if the left mouse button is no longer pressed. I only managed to solve this by introducing a mutable flag. Would anyone have a solution for this, that does not involve mutable state? Here's the relevant code part (please excuse the sloppy dragging code, which snaps the rectangle to the mouse pointer): type MainPage() as this = inherit UserControl() do Application.LoadComponent(this, new System.Uri("/SilverlightApplication1;component/Page.xaml", System.UriKind.Relative)) let layoutRoot : Canvas = downcast this.FindName("LayoutRoot") let rectangle1 : Rectangle = downcast this.FindName("Rectangle1") let mutable isDragged = false do rectangle1.MouseLeftButtonUp.Add(fun _ -> isDragged <- false) let rec drag() = async { let! args = layoutRoot.MouseMove |> Async.AwaitEvent if (isDragged) then Canvas.SetLeft(rectangle1, args.GetPosition(layoutRoot).X) Canvas.SetTop(rectangle1, args.GetPosition(layoutRoot).Y) return! drag() else return() } let wait() = async { while true do let! args = Async.AwaitEvent rectangle1.MouseLeftButtonDown isDragged <- true do! drag() } Async.StartImmediate(wait()) () Thank you very much for your time!

    Read the article

  • How do I make Nautilus windows stick for drag & drop?

    - by e-satis
    When you drag and drop a folder with nautilus, you must carefully set both windows on non overlapping areas of your screen, otherwise selecting one folder will bring the windows to the front, hiding the second one. On Windows, doing so will stick the explorer.exe windows to the back and let you drag and drop the folder. I suppose it detect a long click to decide whether or not bring the window to the front. Is that possible with Ubuntu? Now I know that Nautilus now has split panels by pressing F3, but that not handy. Most of the time, you open a folder, THEN decide to copy. With split panel, you must decide, THEN split the panel and go to the right folder.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >