Class: MotifNavigator

MotifNavigator

A MotifNavigator helps jump between motifs (i.e. by scrolling the window based on the location of the motif). Typical usage involves adding motifs to navigate between using MotifNavigator#addMotif, calling MotifNavigator#start, and then using MotifNavigator#prev and MotifNavigator#next to jump between motifs.

Constructor

new MotifNavigator()

Constructs a new motif navigator
Source:

Members

(static, constant) TOP_SPACING

Source:

Methods

addMotif(visualGraph, motifGroup)

Adds a group of motifs to navigate between
Parameters:
Name Type Description
visualGraph VisualGraph The visual graph that contains the motif group
motifGroup MotifGroup The group of motifs to add
Source:

getNumMotifs() → {Integer}

Gets the number of motifs this class navigates between
Source:
Returns:
the number of motifs this class navigates between
Type
Integer

next()

Jumps to the next motif. Motifs are ordered in ascending order of the y-coordinate of their top-most node. Thus, this method jumps to the motif with the next largest y-coordinate
Source:

prev()

Jumps to the previous motif. Motifs are ordered in ascending order of the y-coordinate of their top-most node. Thus, this method jumps to the motif with the next smallest y-coordinate
Source:

setWrap(wrap)

Sets whether or not the navigation "wraps". If wrap mode is on, the navigator will jump back to the first motif after the last one (or back to the last one after the first if going in a reversed order). Otherwise, the navigator will remain at the last motif.
Parameters:
Name Type Description
wrap Boolean The wrap mode
Source:

start()

Starts the motif navigator. This method should be called after all motifs have been added using MotifNavigator#addMotif.
Source: