1.0.2 • Published 5 years ago

btopo v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

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();
})