Zoom Viewing Rectangle w/ getBBox

Use cursor to pan and mousewheel to zoom. When the svg image is zoomed/panned, determine the size of the viewing rectangle. This example get elements if their bounding box is fully contained in the viewing rectangle.
Computing the Viewing Rectangle:
upper left: X0 = - translationX / scale
upper left: Y0 = - translationY / scale
lower right: X1 = X0 + svgWidth / scale
lower right: Y1 = Y0 + svgHeight / scale

Javascript:
OK in:IE11/CH31/FF23