btopo

1.0.2 • Public • Published

install

npm install --save btopo

basic usage

import Topo from 'btopo'
// create a topo view.
let tp = new Topo("domId");

// create a node and setup node properties.
let n1 = new Topo.Node();
n1.props({
    x: 100,
    y: 100,
    icon: 'images/icon.png'
})

// add n1 to view.
tp.add(n1);

// load images, and render topo.
Topo.imageLoader([
    'images/1.png',
    'images/icon.png'
]).then(()=>{
    tp.render();
})

Readme

Keywords

Package Sidebar

Install

npm i btopo

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

23.3 kB

Total Files

31

Last publish

Collaborators

  • yk.bao