API Docs for: 0.0.1
Show:

MobileProfile Class

Extends Graph
Module: niviz

Visualization of a singular snow profile optimized for mobile viewing.

Constructor

MobileProfile

(
  • station
  • canvas
  • properties
)

Parameters:

  • station Station

    A niViz station object

  • canvas Object

    A svg element that will be used as SnapSVG paper

  • properties Object

Methods

arrange

() private

Arrange the layers for best display

comments

() private

Display the layer comments as footnotes

config

() private

Configure basic properties of the MobileProfile such as font, height and width.

density

() private

Draw the snow density curve

destroy

()

Deregister events

draw

(
  • profile
)

Inherited from Graph but overwritten in lib/graphs/mobile.js:783

Draw the MobileProfile.

Parameters:

  • profile Profile

    The niViz profile to render

grid

() private

Draw the top and bottom grid of the abscissa (user configured) including annotating texts.

markCriticalLayer

()

Mark critical layer

markSoil

()

Mark soil surface

path

(
  • grid
  • path
  • svg
)
private

Draw grid paths, either on the grid (light and dotted) or as solid lines.

Parameters:

  • grid Boolean

    true if dotted, false if solid

  • path Array

    The path to draw

  • svg Object

    group container to append to

remove

(
  • name
)
static

Remove a parameter from the barparams Config MobileProfile.defaults. This method is invoked by the settings modal when a user removes a parameter from the additional parameters section.

Parameters:

  • name String

    Paramter name (e. g. ramm, density)

remove

(
  • name
)
private

Check if the object with identifier name exists in this.elements and try to remove it from the paper and then delete the object itself.

Parameters:

  • name String

    Object identifier

setProperties

(
  • properties
)

Overwrite current properties with the ones passed as parameter.

Parameters:

shiftup

() private

Shift the stratigraphic layers upwards as much as possible

stability

() private

Note snow stability tests in the graph

stratigraphy

() private

Display the hardness profile (including wetness, grain size and grain shape)

temperature

() private

Draw the snow temperature curve

zigzag

()

Mark that profile is not dug to ground