Create the Drag element; load the dependency before if not loaded yet.
976257
function () {
            if (aria.utils.dragdrop && aria.utils.dragdrop.Drag) {
                this._createDraggable();
            } else {
                Aria.load({
                    classes : ["aria.utils.dragdrop.Drag"],
                    oncomplete : {
                        fn : this._createDraggable,
                        scope : this
                    }
                });
            }
        }
137747
public void dragElementTo(String draggable, String droppable, int waitForMillies) throws InterruptedException {
		WebElement draggableEl = translateLocatorToWebElement(draggable);
		WebElement dragReceiver = translateLocatorToWebElement(droppable);

		Actions clickAndDrag = new Actions(getWebDriver());
		clickAndDrag.dragAndDrop(draggableEl, dragReceiver);
		clickAndDrag.perform();

		// ToDO: clarify what to do with the parameter waitForMillies
	}
909184
function () {
        var self = this;

        self._super();

        self.resizeDragHelper = new DragHelper(this._id, {
          start: function () {
            self.fire('ResizeStart');
          },

          drag: function (e) {
            if (self.settings.direction != "both") {
              e.deltaX = 0;
            }

            self.fire('Resize', e);
          },

          stop: function () {
            self.fire('ResizeEnd');
          }
        });
      }
849863
function dragStart(_dragElement, ev, ui) {
		hoverListener.start(function(cell) {
			clearOverlays();
			if (cell) {
				renderCellOverlay(cell.row, cell.col, cell.row, cell.col);
			}
		}, ev);
	}
585287
function ( e )
	{
		var that = this;

		if ( this.dom.drag === null )
		{
			/* Only create the drag element if the mouse has moved a specific distance from the start
			 * point - this allows the user to make small mouse movements when sorting and not have a
			 * possibly confusing drag element showing up
			 */
			if ( Math.pow(
				Math.pow(e.pageX - this.s.mouse.startX, 2) +
				Math.pow(e.pageY - this.s.mouse.startY, 2), 0.5 ) < 5 )
			{
				return;
			}
			this._fnCreateDragNode();
		}

		/* Position the element - we respect where in the element the click occured */
		this.dom.drag.css( {
			left: e.pageX - this.s.mouse.offsetX,
			top: e.pageY - this.s.mouse.offsetY
		} );

		/* Based on the current mouse position, calculate where the insert should go */
		var bSet = false;
		var lastToIndex = this.s.mouse.toIndex;

		for ( var i=1, iLen=this.s.aoTargets.length ; i<iLen ; i++ )
		{
			if ( e.pageX < this.s.aoTargets[i-1].x + ((this.s.aoTargets[i].x-this.s.aoTargets[i-1].x)/2) )
			{
				this.dom.pointer.css( 'left', this.s.aoTargets[i-1].x );
				this.s.mouse.toIndex = this.s.aoTargets[i-1].to;
				bSet = true;
				break;
			}
		}

		// The insert element wasn't positioned in the array (less than
		// operator), so we put it at the end
		if ( !bSet )
		{
			this.dom.pointer.css( 'left', this.s.aoTargets[this.s.aoTargets.length-1].x );
			this.s.mouse.toIndex = this.s.aoTargets[this.s.aoTargets.length-1].to;
		}

		// Perform reordering if realtime updating is on and the column has moved
		if ( this.s.init.bRealtime && lastToIndex !== this.s.mouse.toIndex ) {
			this.s.dt.oInstance.fnColReorder( this.s.mouse.fromIndex, this.s.mouse.toIndex );
			this.s.mouse.fromIndex = this.s.mouse.toIndex;
			this._fnRegions();
		}
	}
881322
function() {
            var DDM = YAHOO.util.DDM;
            if ( YAHOO.util.Event && document ) {
                DDM._onLoad();
            } else {
                if (DDM._timeoutCount > 2000) {
                    YAHOO.log("DragDrop requires the Event Utility", "error", "DragDropMgr");
                } else {
                    setTimeout(DDM._addListeners, 10);
                    if (document && document.body) {
                        DDM._timeoutCount += 1;
                    }
                }
            }
        }
750805
function() {
    if (!this._shape.dragging) {
      this._shape.dragging = new L.Handler.PathDrag(this._shape);
    }
    this._shape.dragging.enable();
    this._shape
      .on('dragstart', this._onStartDragFeature, this)
      .on('dragend', this._onStopDragFeature, this);
  }
709383
protected void prepareHelperElements(
        CmsContainerElementData elementData,
        CmsDNDHandler handler,
        I_CmsDraggable draggable) {

        if (elementData == null) {
            CmsDebugLog.getInstance().printLine("elementData == null!");
            handler.cancel();
            return;
        }
        if (!handler.isDragging()) {
            return;
        }
        if (elementData.isGroup()) {
            m_copyGroupId = m_draggableId;
        } else {
            m_copyGroupId = null;
        }

        if ((elementData.getDndId() != null) && (m_controller.getCachedElement(elementData.getDndId()) != null)) {
            m_draggableId = elementData.getDndId();
            elementData = m_controller.getCachedElement(m_draggableId);
        } else {
            m_draggableId = elementData.getClientId();
        }
        if (m_controller.isGroupcontainerEditing()) {
            CmsGroupContainerElementPanel groupContainer = m_controller.getGroupcontainer();
            if ((groupContainer != m_initialDropTarget)
                && !(elementData.isGroupContainer() || elementData.isInheritContainer())
                && (elementData.getContents().get(groupContainer.getContainerId()) != null)) {
                Element placeholder = null;
                Set<String> cssResources = elementData.getCssResources(groupContainer.getContainerId());
                if ((cssResources != null) && !cssResources.isEmpty()) {
                    // the element requires certain CSS resources, check if present and include if necessary
                    for (String cssResourceLink : cssResources) {
                        CmsDomUtil.ensureStyleSheetIncluded(cssResourceLink);
                    }
                }
                try {
                    String htmlContent = elementData.getContents().get(groupContainer.getContainerId());
                    placeholder = CmsDomUtil.createElement(htmlContent);
                    // ensure any embedded flash players are set opaque so UI elements may be placed above them
                    CmsDomUtil.fixFlashZindex(placeholder);
                    placeholder.addClassName(I_CmsLayoutBundle.INSTANCE.dragdropCss().dragPlaceholder());
                } catch (Exception e) {
                    CmsDebugLog.getInstance().printLine(e.getMessage());
                }

                if (placeholder != null) {
                    prepareDragInfo(placeholder, groupContainer, handler);
                    groupContainer.highlightContainer();
                }
            }
            return;
        }
        if (!m_controller.isEditingDisabled()) {
            for (CmsContainerPageContainer container : m_controller.getContainerTargets().values()) {
                if (draggable.getElement().isOrHasChild(container.getElement())) {
                    // skip containers that are children of the draggable element
                    continue;
                }
                if ((container != m_initialDropTarget)
                    && !container.isDetailView()
                    && (m_controller.getData().isModelGroup() || !container.hasModelGroupParent())
                    && (elementData.getContents().get(container.getContainerId()) != null)) {

                    Element placeholder = null;
                    if (elementData.isGroupContainer() || elementData.isInheritContainer()) {
                        placeholder = DOM.createDiv();
                        String content = "";
                        for (String groupId : elementData.getSubItems()) {
                            CmsContainerElementData subData = m_controller.getCachedElement(groupId);
                            if (subData != null) {
                                if (subData.isShowInContext(
                                    CmsContainerpageController.get().getData().getTemplateContextInfo().getCurrentContext())) {
                                    if ((subData.getContents().get(container.getContainerId()) != null)) {
                                        content += subData.getContents().get(container.getContainerId());
                                    }
                                } else {
                                    content += "<div class='"
                                        + CmsTemplateContextInfo.DUMMY_ELEMENT_MARKER
                                        + "' style='display: none !important;'></div>";
                                }
                            }
                        }
                        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(content)) {
                            placeholder.setInnerHTML(content);
                            // ensure any embedded flash players are set opaque so UI elements may be placed above them
                            CmsDomUtil.fixFlashZindex(placeholder);
                        } else {
                            placeholder.addClassName(
                                I_CmsLayoutBundle.INSTANCE.containerpageCss().emptyGroupContainer());
                        }
                    } else {
                        Set<String> cssResources = elementData.getCssResources(container.getContainerId());
                        if ((cssResources != null) && !cssResources.isEmpty()) {
                            // the element requires certain CSS resources, check if present and include if necessary
                            for (String cssResourceLink : cssResources) {
                                CmsDomUtil.ensureStyleSheetIncluded(cssResourceLink);
                            }
                        }
                        try {
                            String htmlContent = elementData.getContents().get(container.getContainerId());
                            placeholder = CmsDomUtil.createElement(htmlContent);
                            // ensure any embedded flash players are set opaque so UI elements may be placed above them
                            CmsDomUtil.fixFlashZindex(placeholder);
                            placeholder.addClassName(I_CmsLayoutBundle.INSTANCE.dragdropCss().dragPlaceholder());
                        } catch (Exception e) {
                            CmsDebugLog.getInstance().printLine(e.getMessage());
                        }
                    }
                    if (placeholder != null) {
                        prepareDragInfo(placeholder, container, handler);
                    }
                }
            }
            initNestedContainers();
            // add highlighting after all drag targets have been initialized
            updateHighlighting(true);
        }
    }
893890
public void dragUpdate(final INodeXYEvent event)
    {
        m_evtx = event.getX();

        m_evty = event.getY();

        m_dstx = m_evtx - m_begx;

        m_dsty = m_evty - m_begy;

        final Point2D p2 = new Point2D(0, 0);

        m_gtol.transform(new Point2D(m_dstx, m_dsty), p2);

        m_lclp.setX(p2.getX() - m_pref.getX());

        m_lclp.setY(p2.getY() - m_pref.getY());

        // Let the constraints adjust the location if necessary

        if (m_drag != null)
        {
            m_drag.adjust(m_lclp);
        }
        save();
    }
537712
function(e) {
        var DOM = YAHOO.util.Dom;
        this.logger.log(this.id + " endDrag");
        var lel = this.getEl();
        var del = this.getDragEl();

        // Show the drag frame briefly so we can get its position
        // del.style.visibility = "";
        DOM.setStyle(del, "visibility", ""); 

        // Hide the linked element before the move to get around a Safari 
        // rendering bug.
        //lel.style.visibility = "hidden";
        DOM.setStyle(lel, "visibility", "hidden"); 
        YAHOO.util.DDM.moveToEl(lel, del);
        //del.style.visibility = "hidden";
        DOM.setStyle(del, "visibility", "hidden"); 
        //lel.style.visibility = "";
        DOM.setStyle(lel, "visibility", ""); 
    }
174115
function () {
            this._draggable = new ariaUtilsDragdropDrag(this._slider, {
                handle : this._slider,
                proxy : null,
                axis : "x",
                constrainTo : this._sliderContainer
            });
            this._draggable.$on({
                "dragstart" : {
                    fn : this._onDragStart,
                    scope : this
                },
                "move" : {
                    fn : this._onDragMove,
                    scope : this
                },
                "dragend" : {
                    fn : this._onDragEnd,
                    scope : this
                }
            });
        }
740426
def hook_drag(self):
        
        widget = self.widget
        widget.mousePressEvent = self.mousePressEvent
        widget.mouseMoveEvent = self.mouseMoveEvent
        widget.mouseReleaseEvent = self.mouseReleaseEvent
1204644
function(e) {
        if (this._dragging) return;
        this._dragging = true;

        // TODO: remove this and instead lock on pointer control events in future
        Crafty.s("Mouse").bind("MouseMove", this._ondrag);
        Crafty.s("Mouse").bind("MouseUp", this._onup);

        // if event undefined, use the last known position of the mouse
        this.trigger("StartDrag", e || Crafty.s("Mouse").lastMouseEvent);
        return this;
    }
239724
function insertBefore(targetElement, targetScope) {
            // Ensure the placeholder is visible in the target (unless it's a table row)
            if (placeHolder.css('display') !== 'table-row') {
              placeHolder.css('display', 'block');
            }
            if (!targetScope.sortableScope.options.clone) {
              targetElement[0].parentNode.insertBefore(placeHolder[0], targetElement[0]);
              dragItemInfo.moveTo(targetScope.sortableScope, targetScope.index());
            }
          }
1182374
def drag_and_drop_by(right_by, down_by)
      element_call(:wait_for_present) do
        driver.action
              .drag_and_drop_by(@element, right_by, down_by)
              .perform
      end
    end
1270775
function (out, delegateId, cssClassPostfix, skinIcon, label, focusable) {
            // --------------------------------------------------- destructuring

            var cfg = this._cfg;
            var skinnableClass = this._skinnableClass;

            var waiAria = cfg.waiAria;

            // ------------------------------------------------------ processing

            // wrapper (opening) -----------------------------------------------

            var attributes = [];

            // Adding atdraggable="" to make sure clicking on the button does not start the drag operation
            // Using the atdraggable attribute directly instead of the aria.utils.Mouse.DRAGGABLE_ATTRIBUTE
            // variable because aria.utils.Mouse may not be loaded yet.
            attributes.push('atdraggable=""');

            attributes.push('class="' + [
                'x' + skinnableClass + '_' + cssClassPostfix,
                'x' + skinnableClass + '_' + cfg.sclass + '_' + cssClassPostfix
            ].join(' ') + '"');

            attributes.push(ariaUtilsDelegate.getMarkup(delegateId));

            var openingTagMarkup = '<span ' + attributes.join(' ') + '>';

            out.write(openingTagMarkup);

            // button ----------------------------------------------------------

            var iconConfiguration = {
                icon : this._skinObj[skinIcon],
                waiAria : waiAria
            };

            if (label) {
                iconConfiguration.tooltip = label;
                iconConfiguration.label = label;
            }

            if (label || focusable) {
                iconConfiguration.role = 'button';
            }

            if (focusable) {
                iconConfiguration.tabIndex = 0;
            }


            var button = new ariaWidgetsIcon(iconConfiguration, this._context, this._lineNumber);

            out.registerBehavior(button);

            button.writeMarkup(out);

            // wrapper (closing) -----------------------------------------------

            out.write('</span>');

            // ---------------------------------------------------------- return

            return button;
        }
952705
protected void addSource (
        DragSource source, JComponent comp, boolean autoremove)
    {
        _draggers.put(comp, source);
        comp.addMouseListener(_sourceListener);
        comp.addMouseMotionListener(_sourceListener);
        if (autoremove) {
            comp.addAncestorListener(_remover);
        }
    }