v0.1.40
Zoom programmatically
You can now zoom programmatically with two new methods :
zoom(start,end)
: The feature viewer will zoom on the coordinates passed in parameters.resetZoom()
: Will reset the zoom.
Zoom listener
Thanks to @fredludlow, it is now possible to listen for zoom event with the method zoom(start,end)
. This method take a function (callback) in parameter, that will receive a event object containing the coordinates & zoom level.
var ft = new FeatureViewer(213, '#fv1', options);
ft.onZoom(function (d) {
console.log(d.detail);
});
ClearInstance()
You may sometimes want to reload your feature-viewer with new parameters. To avoid memory leaks, the method clearInstance()
will clear each element & listener for you before you delete the feature-viewer instance.
Add AA to position text
Thanks again to @fredludlow, in addition to the position of the mouse in the feature-viewer, there's now the specific character of the sequence at this position.
Check the documentation for more details :
https://cdn.rawgit.com/calipho-sib/feature-viewer/v0.1.40/examples/index.html