mbostock
This example demonstrates how to constrain d3-zoom such that a rectangular area of interest is not allowed to go outside the viewport.
https://d3js.org/d3.v4.min.js