WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

DragContainerElement

DragContainerElement: HTMLElement | SVGSVGElement | SVGGElement

Container element type usable for mouse/touch functions

DraggedElementBaseType

DraggedElementBaseType: Element

DraggedElementBaseType serves as an alias for the 'minimal' data type which can be selected without 'd3-drag' (and related code in 'd3-selection') trying to use properties internally which would otherwise not be supported.

Functions

drag

  • Creates a new drag behavior. The returned behavior, drag, is both an object and a function, and is typically applied to selected elements via selection.call.

    Use this signature when using the default subject accessor.

    The first generic refers to the type of element to be dragged. The second generic refers to the type of the datum of the dragged element.

    Type parameters

    Returns DragBehavior<GElement, Datum, Datum | SubjectPosition>

  • Creates a new drag behavior. The returned behavior, drag, is both an object and a function, and is typically applied to selected elements via selection.call.

    Use this signature when using a custom subject accessor.

    The first generic refers to the type of element to be dragged. The second generic refers to the type of the datum of the dragged element. The third generic refers to the type of the drag behavior subject.

    Type parameters

    Returns DragBehavior<GElement, Datum, Subject>

dragDisable

  • dragDisable(window: Window): void
  • Prevents native drag-and-drop and text selection on the specified window. As an alternative to preventing the default action of mousedown events, this method prevents undesirable default actions following mousedown. In supported browsers, this means capturing dragstart and selectstart events, preventing the associated default actions, and immediately stopping their propagation. In browsers that do not support selection events, the user-select CSS property is set to none on the document element. This method is intended to be called on mousedown, followed by d3.dragEnable on mouseup.

    Parameters

    • window: Window

      The window for which drag should be disabled.

    Returns void

dragEnable

  • dragEnable(window: Window, noClick?: boolean): void
  • Allows native drag-and-drop and text selection on the specified window; undoes the effect of d3.dragDisable. This method is intended to be called on mouseup, preceded by d3.dragDisable on mousedown. If noclick is true, this method also temporarily suppresses click events. The suppression of click events expires after a zero-millisecond timeout, such that it only suppress the click event that would immediately follow the current mouseup event, if any.

    Parameters

    • window: Window

      The window for which drag should be (re-)enabled.

    • Optional noClick: boolean

      An optional flag. If noclick is true, this method also temporarily suppresses click events.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc