i trying to add a perfectScrollBar directive to d3 library doing something like this
svg.attr('perfectScrollBar', '')
bit its not working. can anyone please give me example how u add directive in d3 library?
mb it helps someone. I found another solution
use new PerfectScrollBar after your div container is initialized
in my case i add it when mouse entered this container
//'this' is html div container, scrollbar is a variable to have possibility update
//PerfectScrollBar
function onMouseEnter() {
if (!scrollBar) {
scrollBar = new PerfectScrollbar(this, {
wheelPropagation: false
});
} else {
scrollBar.update();
}
}