Highlighters can be used to provide visual emphasis to an element; during user interactions for example.
In the above demo, we listen to the paper for the cell:pointerclick
event, then highlight the cell that was clicked.
paper.on('cell:pointerclick', function(cellView) {
cellView.highlight();
});
As you can see it is possible to highlight a cell as follows:
cellView.highlight();
Unhighlighting a cell is simple too:
cellView.unhighlight();
To highlight a cell using a specific highlighter (and options):
cellView.highlight(null/* defaults to cellView.el */, {
highlighter: {
name: 'stroke',
options: {
width: 3
}
}
});
Or you can specify just the highlighter's name (its default options will be used):
cellView.highlight(null/* defaults to cellView.el */, {
highlighter: 'stroke'
});