Components Interactions Examples Tutorials API FAQ
Options
Menu

Hierarchy

Index

Constructors

constructor

  • Constructs a DragBoxLayer.

    A DragBoxLayer is a SelectionBoxLayer with a built-in Drag Interaction. A drag gesture will set the Bounds of the box. If resizing is enabled using resizable(true), the edges of box can be repositioned.

    constructor

    Returns DragBoxLayer

Properties

Protected _boundingBox

_boundingBox: Selection<void>

Protected _box

_box: Selection<void>

Protected _clipPathEnabled

_clipPathEnabled: boolean

Private _detectionCornerBL

_detectionCornerBL: any

Private _detectionCornerBR

_detectionCornerBR: any

Private _detectionCornerTL

_detectionCornerTL: any

Private _detectionCornerTR

_detectionCornerTR: any

Private _detectionEdgeB

_detectionEdgeB: any

Private _detectionEdgeL

_detectionEdgeL: any

Private _detectionEdgeR

_detectionEdgeR: any

Private _detectionEdgeT

_detectionEdgeT: any

Private _detectionRadius

_detectionRadius: any

Private _disconnectInteraction

_disconnectInteraction: any

Private _dragCallbacks

_dragCallbacks: any

Private _dragEndCallbacks

_dragEndCallbacks: any

Private _dragInteraction

_dragInteraction: any

Private _dragStartCallbacks

_dragStartCallbacks: any

Protected _hasCorners

_hasCorners: boolean

Protected _isAnchored

_isAnchored: boolean

Protected _isSetup

_isSetup: boolean

Private _movable

_movable: any

Private _resizable

_resizable: any

Protected _xBoundsMode

_xBoundsMode: PropertyMode

Protected _yBoundsMode

_yBoundsMode: PropertyMode

Methods

Private _getResizingEdges

  • _getResizingEdges(p: any): any

Private _resetState

  • _resetState(): any

Protected _setBounds

  • _setBounds(newBounds: Bounds): void

Private _setMovableClass

  • _setMovableClass(): any

Protected _setResizableClasses

  • _setResizableClasses(canResize: boolean): void

Private _setUpCallbacks

  • _setUpCallbacks(): any

Protected _setXExtent

  • _setXExtent(xExtent: number | object): void

Protected _setYExtent

  • _setYExtent(yExtent: number | object): void

Protected _setup

  • _setup(): void

Protected _sizeFromOffer

  • _sizeFromOffer(availableWidth: number, availableHeight: number): object

addClass

  • addClass(cssClass: string)

anchor

background

  • Gets the Selection containing the behind the visual elements of the Component.

    Will return undefined if the Component has not been anchored.

    Returns Selection<void>

    background selection for the Component

bounds

boxVisible

  • boxVisible(): boolean
  • boxVisible(show: boolean)

computeLayout

  • computeLayout(origin?: Point, availableWidth?: number, availableHeight?: number)
  • Computes and sets the size, position, and alignment of the Component from the specified values. If no parameters are supplied and the Component is a root node, they are inferred from the size of the Component's element.

    Parameters

    • Optional origin: Point
    • Optional availableWidth: number
    • Optional availableHeight: number

content

  • Gets a Selection containing a that holds the visual elements of the Component.

    Will return undefined if the Component has not been anchored.

    Returns Selection<void>

    content selection for the Component

destroy

  • destroy(): void

detach

  • detach()

detectionRadius

  • detectionRadius(): number
  • detectionRadius(r: number)
  • Gets the detection radius of the drag box in pixels.

    Returns number

  • Sets the detection radius of the drag box in pixels.

    Parameters

    • r: number

dragInteraction

  • dragInteraction(): Drag

enabled

  • enabled(enabled: boolean)
  • enabled(): boolean

fixedHeight

  • fixedHeight(): boolean

fixedWidth

  • fixedWidth(): boolean

foreground

  • Gets the Selection containing the in front of the visual elements of the Component.

    Will return undefined if the Component has not been anchored.

    Returns Selection<void>

hasClass

  • hasClass(cssClass: string): boolean
  • Checks if the Component has a given CSS class.

    Parameters

    • cssClass: string

      The CSS class to check for.

    Returns boolean

height

  • height(): number

movable

  • movable(): boolean
  • movable(movable: boolean)
  • Gets whether or not the drag box is movable.

    Returns boolean

  • Sets whether or not the drag box is movable.

    Parameters

    • movable: boolean

offAnchor

offDetach

offDrag

offDragEnd

offDragStart

onAnchor

onDetach

onDrag

onDragEnd

onDragStart

onResize

  • Sets a callback that gets called when the component resizes. The size change is not guaranteed to be reflected by the DOM at the time the callback is fired.

    Parameters

origin

originToSVG

parent

redraw

  • redraw()
  • Causes the Component to re-layout and render.

    This function should be called when a CSS change has occured that could influence the layout of the Component, such as changing the font size.

removeClass

  • removeClass(cssClass: string)

render

  • render()

renderImmediately

  • renderImmediately()

renderTo

  • renderTo(element: String | Element | Selection<void>)

requestedSpace

  • requestedSpace(availableWidth: number, availableHeight: number): SpaceRequest

resizable

  • resizable(): boolean
  • resizable(canResize: boolean)
  • Gets whether or not the drag box is resizable.

    Returns boolean

  • Sets whether or not the drag box is resizable.

    Parameters

    • canResize: boolean

width

  • width(): number

xAlignment

  • xAlignment(): string
  • xAlignment(xAlignment: string)

xExtent

  • xExtent(): number | object
  • xExtent(xExtent: number | object)

xScale

yAlignment

  • yAlignment(): string
  • yAlignment(yAlignment: string)

yExtent

  • yExtent(): number | object
  • yExtent(yExtent: number | object)

yScale

Generated using TypeDoc