This version of the ShapeDiver viewer is no longer supported.

Please refer to the version 3 documentation here. See also the migration guide from version 2 to version 3 here.

Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SnapModule

Implements

Index

Constructors

constructor

  • Creates the SnapModule.

    Cannot be created without the api reference.

    Parameters

    • api: ApiInterfaceV2

    Returns SnapModule

Accessors

EVENTTYPE

  • get EVENTTYPE(): { DRAG_END: string; DRAG_MOVE: string; DRAG_START: string }
  • Get all possible event types.

    Returns { DRAG_END: string; DRAG_MOVE: string; DRAG_START: string }

    • DRAG_END: string

      "drag.end"

    • DRAG_MOVE: string

      "drag.move"

    • DRAG_START: string

      "drag.start"

Methods

addAnchorElement

addEventListener

  • addEventListener(type: string, cb: (event: IEventData) => {}): string
  • Add an event listener for the specified type with the specified callback.

    Parameters

    Returns string

addSnapLine

addSnapPoint

removeAnchorElement

  • removeAnchorElement(id: string): void
  • Remove an anchor element from the list of anchor elements.

    Parameters

    • id: string

    Returns void

removeEventListener

  • removeEventListener(id: string): void

removeSnapLine

  • removeSnapLine(id: string): void
  • Remove a line from the list of lines which can be snapped to.

    Parameters

    • id: string

    Returns void

removeSnapPoint

  • removeSnapPoint(id: string): void
  • Remove a point from the list of points which can be snapped to.

    Parameters

    • id: string

    Returns void