Drag-and-drop
   HOME

TheInfoList



OR:

In
computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations ( computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These prog ...
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, ins ...
s, drag and drop is a pointing device gesture in which the
user Ancient Egyptian roles * User (ancient Egyptian official), an ancient Egyptian nomarch (governor) of the Eighth Dynasty * Useramen, an ancient Egyptian vizier also called "User" Other uses * User (computing), a person (or software) using an ...
selects a virtual object by "grabbing" it and dragging it to a different location or onto another virtual object. In general, it can be used to invoke many kinds of actions, or create various types of associations between two
abstract object In metaphysics, the distinction between abstract and concrete refers to a divide between two types of entities. Many philosophers hold that this difference has fundamental metaphysical significance. Examples of concrete objects include plants, h ...
s. As a feature, drag-and-drop support is not found in all
software Software is a set of computer programs and associated documentation and data. This is in contrast to hardware, from which the system is built and which actually performs the work. At the lowest programming level, executable code consist ...
, though it is sometimes a fast and easy-to-learn technique. However, it is not always clear to users that an item can be dragged and dropped, or what is the command performed by the drag and drop, which can decrease usability.


Actions

The basic sequence involved in drag and drop is: * Move the pointer to the object * Press, and hold down, the button on the
mouse A mouse ( : mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus' ...
or other
pointing device A pointing device is a human interface device that allows a user to input spatial (i.e., continuous and multi-dimensional) data to a computer. CAD systems and graphical user interfaces (GUI) allow the user to control and provide data to ...
, to "grab" the object * "Drag" the object to the desired location by moving the pointer to this one * "Drop" the object by releasing the button Dragging requires more physical effort than moving the same pointing device without holding down any buttons. Because of this, a user cannot move as quickly and precisely while dragging (see
Fitts' law Fitts's law (often cited as Fitts' law) is a predictive model of human movement primarily used in human–computer interaction and ergonomics. The law predicts that the time required to rapidly move to a target area is a function of the ratio betw ...
). However, drag-and-drop operations have the advantage of thoughtfully chunking together two operands (the object to drag, and the drop location) into a single action. Extended dragging and dropping (as in graphic design) can stress the mousing hand. A design problem appears when the same button selects and drags items. Imprecise movement can cause an attempt to select an object to register as a dragging motion. Another problem is that the target of the dropping can be hidden under other objects. The user would have to stop the dragging, make both the source and the target visible and start again. In classic Mac OS the top-of-screen menu bar served as a universal "drag cancel" target. This issue has been dealt with in
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lap ...
with the introduction of Exposé.


In Mac OS

Drag and drop, called click and drag at the time, was used in the original Macintosh to manipulate files (for example, copying them between disks or folders.). System 7 added the ability to open a document in an application by dropping the document icon onto the application's icon. In
System 7.5 System 7, codenamed "Big Bang", and also known as Mac OS 7, is a graphical user interface-based operating system for Macintosh computers and is part of the classic Mac OS series of operating systems. It was introduced on May 13, 1991, by Apple Co ...
, drag and drop was extended to common clipboard operations like copying or moving textual content within a document. Content could also be dragged into the filesystem to create a "clipping file" which could then be stored and reused. For most of its history Mac OS has used a single button mouse with the button covering a large portion of the top surface of the mouse. This may mitigate the ergonomic concerns of keeping the button pressed while dragging.


In OS/2

The Workplace Shell of
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 r ...
uses dragging and dropping extensively with the secondary mouse button, leaving the primary one for selection and clicking. Its use like that of other advanced Common User Access features distinguished native OS/2 applications from
platform-independent In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software r ...
ports.


In HTML

The HTML5 working draft specification includes support for drag and drop. HTML5 supports different kinds of dragging and dropping features including: * Drag and Drop texts and HTML codes * Drag and Drop HTML elements * Drag and Drop files Based on needed action, one of the above types can be used. Note that when an HTML element is dragged for moving its current position, its ID is sent to the destination parent element; so it sends a text and can be considered as the first group. Google's web-based e-mail application Gmail supports drag-and-drop of images and attachments in the latest
Google Chrome Google Chrome is a cross-platform web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, ...
browser and Apple's
Safari A safari (; ) is an overland journey to observe wild animals, especially in eastern or southern Africa. The so-called "Big Five" game animals of Africa – lion, leopard, rhinoceros, elephant, and Cape buffalo – particularly form an impor ...
(5.x). Google Images permits users to drag and drop image files into a browser to perform a
reverse image search Reverse image search is a content-based image retrieval (CBIR) query technique that involves providing the CBIR system with a sample image that it will then base its search upon; in terms of information retrieval, the sample image is very useful ...
.


On a touch screen

Touch screen interfaces also include drag and drop, or more precisely, long press, and then drag, e.g. on the iPhone or Android home screens.
iOS 11 iOS 11 is the iOS version history, eleventh major release of the iOS mobile operating system developed by Apple Inc., being the successor to iOS 10. It was announced at the company's Apple Worldwide Developers Conference, Worldwide Developers C ...
implements a drag-and-drop feature which allows the user to touch items (and tap with other fingers to drag more) within an app or between apps on
iPad The iPad is a brand of iOS and iPadOS-based tablet computers that are developed by Apple Inc., Apple Inc. The iPad was conceived before the related iPhone but the iPhone was developed and released first. Speculation about the development, ...
s. On iPhones, the functionality is only available within the same app that the user started the drag.


In end-user programming

Drag and drop is considered an important program construction approach in many
end-user development End-user development (EUD) or end-user programming (EUP) refers to activities and tools that allow end-users – people who are not professional software developers – to program computers. People who are not professional developers can use EUD ...
systems. In contrast to more traditional, text-based programming languages, many end-user programming languages are based on visual components such as tiles or icons that are manipulated by end users through drag-and-drop interfaces.
AgentSheets AgentSheets was one of the first modern block-based programming language for kids. The idea of AgentSheets was to overcome syntactic challenges found in common text-based programming languages by using drag and drop mechanisms conceptualizing com ...
, a programming environment for kids, introduced the modern notion of drag and drop blocks programming providing 4 core affordances: 1) Blocks that are end-user composable, 2) blocks are end-user editable, 3) blocks can be nested to represent tree structures, 4) blocks are arranged geometrically to define syntax. Drag and drop is also featured in many shader editing programs for graphics tools, such as Blender. Drag and drop also features in some video game engines, including
Unreal Engine Unreal Engine (UE) is a 3D computer graphics game engine developed by Epic Games, first showcased in the 1998 first-person shooter game '' Unreal''. Initially developed for PC first-person shooters, it has since been used in a variety of g ...
, GameMaker Studio, Construct 2 and, with expansion,
Unity Unity may refer to: Buildings * Unity Building, Oregon, Illinois, US; a historic building * Unity Building (Chicago), Illinois, US; a skyscraper * Unity Buildings, Liverpool, UK; two buildings in England * Unity Chapel, Wyoming, Wisconsin, US; a ...
.


Examples

A common example is dragging an icon on a virtual desktop to a special
trashcan A waste container, also known as a dustbin, garbage can, and trash can is a type of container that is usually made out of metal or plastic. The words "rubbish", "basket" and "bin" are more common in British English usage; "trash" and "can" a ...
icon An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, and Catholic churches. They are not simply artworks; "an icon is a sacred image used in religious devotion". The mos ...
to delete a file. Further examples include: * Dragging a data file onto a
program Program, programme, programmer, or programming may refer to: Business and management * Program management, the process of managing several related projects * Time management * Program, a part of planning Arts and entertainment Audio * Programm ...
icon An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, and Catholic churches. They are not simply artworks; "an icon is a sacred image used in religious devotion". The mos ...
or window for viewing or processing. For instance, dropping an icon that represents a text file into a Microsoft Word window signifies "Open this document as a new document in Word" * Moving or copying files to a new location/directory/folder, * Adding objects to a list of objects to be processed, * Rearranging widgets in a
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, ins ...
to customize their layout, * Dragging an attribute onto an object to which the command is to be applied, ** e.g. dragging a color onto a graphical object to change its color, * Dragging a tool to a canvas location to apply the tool at that location, * Creating a
hyperlink In computing, a hyperlink, or simply a link, is a digital reference to data that the user can follow or be guided by clicking or tapping. A hyperlink points to a whole document or to a specific element within a document. Hypertext is text w ...
from one location or word to another location or document. * Most word processors allow dragging selected text from one point to another. * Dragging a series of code blocks such as in Blender for designing shaders and materials.


See also

*
Mouse gesture In computing, a pointing device gesture or mouse gesture (or simply gesture) is a way of combining pointing device or finger movements and clicks that the software recognizes as a specific computer event and responds to accordingly. They can ...
* Point and click * Snap (computer graphics)


References

{{reflist User interface techniques