canvas-label
v0.1.0
Published
Geometry type for canvas-tree, representing text label
Downloads
6
Readme
Canvas Label
Geometry type for canvas-tree
Installation
$ npm install --save canvas-label
Usage
import label from 'canvas-label';
import createCanvas from 'canvas-tree';
const canvas = createCanvas(document.getElementById('canvas'));
canvas.update({
children: [
{
geometry: label,
children: [],
style: {
content: 'Foo Bar',
color: '#f4f4f4',
fontSize: 12,
fontFamily: 'Roboto', // don't forget to include it
textAlign: 'center'
}
}
]
})