an es2015 iteration on the block D3 event filtering from @pkerpedjiev
this iteration also makes sure the title text is not accidentally selected when attemption to drag over an un-draggable red circle:
svg.selectAll('text')
.style('-webkit-user-select', 'none') /* Chrome/Safari */
.style('-moz-user-select', 'none') /* Firefox */
.style('-ms-user-select', 'none') /* IE10+ */
credit to this stackoverflow answer for the styles to make text un-selectable in most browsers
xxxxxxxxxx
<meta charset='utf-8'>
<body>
<div id='zoom-filtering-div'>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.js'></script>
<script src='vis.js'></script>
<script>
zoomFiltering('#zoom-filtering-div');
</script>
</body>
https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.js