Skip to content
This repository has been archived by the owner on May 22, 2022. It is now read-only.
greenify edited this page Sep 25, 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.

If you are trying to understand the Event handling of the views, this is mostly delegated by Backbone.

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