Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
percent: 10,
label: '.header',
color: 'yellow',
}]
});
screen.append(donut);
var map = contrib.map({
label: 'World Map',
border: config.border,
width: '80%',
height: '60%',
draggable: true
});
//map.addMarker({"lon" : "-79.0000", "lat" : "37.5000", color: "red", char: "X" })
screen.append(map);
var tree = contrib.tree({
fg: 'orange',
label: 'Fruit Tree',
border: config.border,
width: '50%',
height: '30%',
draggable: true
});
//allow control the table with the keyboard
tree.focus();
tree.on('select', function(node) {
if (node.myCustomProperty) {
console.log(node.myCustomProperty);
}
console.log(node.name);