API Docs for: 0.0.1
Show:

Header Class

Module: niviz

The static Header class provides a few static methods to draw compact or full headers and the grain shape legend in SLFProfile, StructureProfile and SimpleProfile. Furthermore methods such as Header.link may be used to make any Element object into a clickable hyperlink.

Item Index

Methods

Methods

draw

(
  • ctx
  • left
  • width
)
static

This method draws the compact or full header or the full header with a grain shape legend below.

Parameters:

  • ctx Object

    The context to be used (typically a profile graph)

  • left Number

    Leftmost pixel of the header

  • width Number

    The width of the header in pixels

height

(
  • p
  • paper
  • profile
  • left
  • width
)
Number static

This function returns the presumptive pixel height of the header for the passed properties.

Parameters:

  • p Object

    niViz graph properties

  • paper Object

    SnapSVG paper

  • profile Profile

    niViz profile

  • left Number

    Left offset of the header

  • width Number

    Width of the header

Returns:

Number:

The height of the header in pixel