Options
All
  • Public
  • Public/Protected
  • All
Menu

An anchor is a flexible position at a DOM element

Hierarchy

  • Anchor

Index

Constructors

constructor

Accessors

pos

pos:

Methods

checkForPositionChange

  • checkForPositionChange(): boolean
  • checks wether the anchor position has changed and updates its position accordingly

    Returns boolean

    true if there was a change

compute

  • compute(): [number, number]

distance

  • distance(pos: [number, number]): number
  • returns the square distance of this anchor point to the given point

    Parameters

    • pos: [number, number]

      the current point

    Returns number

    the square distance

toString

  • toString(): string
  • returns the ids identifying this anchor based on the data-anchor DOM attribute

    Returns string

Static fromString

  • fromString(s: string, lazy?: boolean): Anchor
  • converts the given encoded anchor string to its DOM element

    Parameters

    • s: string
    • Default value lazy: boolean = true

    Returns Anchor

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