SLFProfile Class
Visualization of a singular snow profile SLF style.
Constructor
SLFProfile
()
Item Index
Methods
- add
- align
- arrange
- arrows
- buildpopup
- clear
- comment
- commentstxt
- config
- connect
- coordsys
- cttxt
- destroy
- directlayout
- draw
- draw_block
- draw_columns
- draw_curve
- draw_lower_legend
- ecttxt
- flags
- flagstxt
- format
- header
- highlight
- hs
- index
- layout
- loadcolumns
- mousemove
- mouseon
- partition
- position
- rbtxt
- remove
- select
- setProperties
- setup
- shiftdown
- show
- slope
- stbtxt
- table
- testorder
- testprint
- toggle
- toString
- unhighlight
- y
- zoom
Methods
add
-
object
-
[position]
align
-
partitions
Parameters:
-
partitions
Array< Array
Returns:
arrange
-
partitions
Parameters:
-
partitions
Array< Array
arrows
-
params
-
name
Draw the arrows for the parameters passed.
Parameters:
-
params
ArrayThe parameters to be drawn
-
name
StringName for the svg group container, that will hold the arrows
buildpopup
-
paper
-
p
-
text
-
x
-
y
Build the popup for the temperature / gradient curve.
clear
()
private
Delete the hs, datesmall and layerlines elements.
comment
()
private
Draw the comment box on the graph.
commentstxt
-
paper
-
p
-
center
-
txt
-
layer
-
offsetx
-
width
-
height
-
lindex
Parameters:
-
paper
ObjectSnapSVG paper -
p
ObjectProperties object -
center
ObjectPixel coordinates used for positioning -
txt
ObjectFont object -
layer
ValueThe layer object, -
offsetx
ValueThe x-coord at the left of the column -
width
ValueMax-width number of fontsizes -
height
ValueHeight of the cell in pixel -
lindex
NumberLayer index (for cross referencing)
Returns:
config
()
private
Configure basic properties of the SLFProfile and the parent class TabularProfile such as font, table margins, height and width.
connect
-
partition
-
offset
Parameters:
-
partition
ArrayPrimary partition, to be connected to graph -
offset
NumberPixel position of the right edge of the graph
coordsys
()
private
Draw the coordinate system
cttxt
-
paper
-
p
-
center
-
txt
-
layer
Parameters:
Returns:
destroy
()
Deregister events
directlayout
-
partition
-
data
Parameters:
-
partition
ArrayThe partition (column) to be layed out -
data
Feature
draw
()
Draw the SLFProfile and set up the mouse events.
draw_block
-
parameter
-
color
-
name
Draw a parameter of the profile as a staircase graph.
draw_columns
-
partitions
Parameters:
-
partitions
Array< ArrayAll partitions
draw_curve
-
parameter
Draw a parameter of the profile as a curve.
Parameters:
-
parameter
StringThe profile parameter (e. g. temperature, gradient)
draw_lower_legend
-
parameter
Draw legend for the curve (temperature/gradient) at the bottom of the graph.
Parameters:
-
parameter
StringThe profile parameter (e. g. temperature, gradient)
ecttxt
-
paper
-
p
-
center
-
txt
-
layer
Parameters:
Returns:
flags
-
offset
-
data
Parameters:
-
offset
NumberPixel position -
data
Feature
flagstxt
-
paper
-
p
-
center
-
txt
-
layer
-
offset
Parameters:
Returns:
format
-
textbox
-
current
-
addendum
Actually add the addendum string by making sure it doesn't transgress the boundaries of the textbox.
Parameters:
Returns:
The altered comment string
header
-
offset
-
options
-
data
highlight
-
y
Parameters:
-
y
Numbery-coordinate as pixel value
index
-
y
Parameters:
-
y
Numbery-coordinate as pixel value
Returns:
layout
-
partitions
Parameters:
-
partitions
Array< Array
Returns:
loadcolumns
()
private
mousemove
()
Boolean
private
Method to be called when mousemove event is detected. It calls the method SLFProfile:show in turn and deals with the comment box.
Returns:
on Turn mouse events on
mouseon
()
private
partition
-
partition
-
data
-
height
Parameters:
-
partition
ArrayThe primary (column) to be layed out -
data
Feature -
height
NumberThe minimal height of a table row
Returns:
position
-
partitions
-
index
-
primeindex
-
data
-
height
Parameters:
Returns:
print
-
param
-
lbl
-
box
-
current
Print the stability test ECT and CT (comment section).
Parameters:
Returns:
The altered comment string
rbtxt
-
paper
-
p
-
center
-
txt
-
layer
Parameters:
Returns:
remove
-
column
Parameters:
-
column
NumberThe column index to remove
select
()
Array< Array
private
Returns:
setProperties
-
properties
Overwrite current properties with the ones passed as parameter.
Parameters:
-
properties
Object
setup
()
private
Configure the axes for hs, hardness, temperature and the gradient parameters.
shiftdown
-
partitions
-
primeindex
-
primepos
-
index
-
shift
-
height
Parameters:
-
partitions
Array< ArrayAll partitions -
primeindex
NumberIndex of primary partition -
primepos
NumberOnly shift down below this height of the primary partition -
index
NumberIndex up to which shifting may occur (i. e. currently positioned) -
shift
NumberNumber of pixels to shift down -
height
NumberMinimal height of a row
show
-
x
-
y
Draw the popup for the temperature or gradient curve (whichever is present) if mouse cursor is close to or on data point of the curve.
slope
-
x
-
y
-
svg
stbtxt
-
paper
-
p
-
center
-
txt
-
layer
Parameters:
Returns:
table
()
protected
testorder
-
test
Check if the passed stability test is ordered and if so return the ordered sequence.
Parameters:
-
test
FeatureCT or ECT
Returns:
The sequence of tests
testprint
-
box
-
current
Print the stability test ECT and CT (comment section).
Returns:
The altered comment string
toggle
()
private
Toggle between gradient and temperature curve.
toString
-
value
-
type
-
offset
-
y
-
width
-
height
-
layer
Parameters:
Returns:
unhighlight
()
private
y
-
y
Parameters:
-
y
NumberSnow height
Returns:
zoom
-
range
Parameters:
-
range
ObjectAn object with a min, max and axis property