Options
All
  • Public
  • Public/Protected
  • All
Menu

Module svgStyle

Index

Interfaces

Variables

Functions

Variables

initialSvgStyle

initialSvgStyle: SvgStyle = ...

Functions

grabHeight

  • grabHeight(svg: null | SVGElement): number
  • Grabs the client-height of the svg element, or 1 if the svg element hasn't yet been initialized. The client-height is a read-only property returns the height of the html element, including vertical padding and borders, as an integer. The reason that we return 1 when the svg element hasn't yet been initialized, is so that the aspect (width / height) is 1.

    Parameters

    • svg: null | SVGElement

      The svg element

    Returns number

    The client height of the svg

grabWidth

  • grabWidth(svg: null | SVGElement): number
  • Grabs the client-width of the svg element, or 1 if the svg element hasn't yet been initialized. The client-width is a read-only property returns the width of the html element, including horizontal padding and borders, as an integer. The reason that we return 1 when the svg element hasn't yet been initialized, is so that the aspect (width / height) is 1.

    Parameters

    • svg: null | SVGElement

      The svg element

    Returns number

    The client width of the svg

Generated using TypeDoc