Skip to content
This repository has been archived by the owner on May 22, 2022. It is now read-only.
Seb edited this page Aug 18, 2014 · 6 revisions

Event system

This component behaves according to the BioJS 2 events guidelines. This means that the (1) Observer pattern is used and (2) the function have the same name on, off, once.

However this component uses the mediator pattern, so you might listen to g - the event bus.

Rows

# residues
msa.on "residue:click", (data) ->
msa.on "residue:mousein", (data) ->
msa.on "residue:mouseout", (data) ->

data consists of

seqId: row
rowPos: columnid
evt: original event

Rows

# rows (click done by the label)
msa.on "row:click", (data) ->
msa.on "row:mousein", (data) ->
msa.on "row:mouseout", (data) ->

Columns

# click done by the
msa.on "column:click", (data) ->
msa.on "column:mousein", (data) ->
msa.on "column:mouseout", (data) ->

Meta info

msa.on "meta:click", (data) ->
msa.on "meta:mousein", (data) ->
msa.on "meta:mouseout", (data) ->

Sequence events

msa.on "seq:add" # data = sequence object

Further events

msa.on "redraw"

You can also listen to any change of any model. See Backbone listenTo for more details.

msa.g.zoomer.on "change:visibleText" (model,property) ->
Clone this wiki locally