Zoom Viewing Rectangle w/ checkIntersection

When the svg image is zoomed/panned, determine the size of the viewing rectangle. This example shows elements when they are either fully contained and/or intersect the viewing rectangle. Uses getCTM.
Computing the Viewing Rectangle:
upper left: X0 = - translationX / scale
upper left: Y0 = - translationY / scale
width: W = X0 + svgWidth / scale
height: H = Y0 + svgHeight / scale

Javascript:
OK in:IE11/CH31/FF23