biojs-vis-easy_features

0.0.4 • Public • Published

Easy features

A super simple feature component written in CoffeeScript.

Build Status NPM version Dependencies Code Climate NPM downloads

example

You can fetch prebuilt files here

Example

<script src="build/biojs_vis_easy_features.min.js"></script>
<div id='feature'></div>
<script>
var Feature = biojs.vis.easy_features.model;

// features
var f1 = new Feature(2,20,"easy", "red");
var f2 = new Feature(5,20,"component", "green");
var f3 = new Feature(21,30,"feature", "blue");


var msa = new biojs.vis.easy_features.stage('feature',[f1,f2,f3]);

msa.on("all", function(eventName, arg){
    console.log(eventName)
    console.log(arg)
})
</script>

npm

Yes you can just require this with npm.

var Feature = require("biojs-vis-easy_features").model;
var stage = require("biojs-vis-easy_features").stage;

Feature object

Constructor:

new Feature(xStart, xEnd, text, fillColor)

Entire object with default values.

xStart: -1
xEnd: -1
height: -1
text: ""
fillColor: "red"
fillOpacity: 0.5
type: "rectangle"
borderSize: 1
borderColor: "black"
borderOpacity: 0.5

Readme

Keywords

Package Sidebar

Install

npm i biojs-vis-easy_features

Weekly Downloads

1

Version

0.0.4

License

Apache 2

Last publish

Collaborators

  • greenify