Finding whether an SVG element is visible in the viewport
问题 Say I have some SVG that looks like the following. #canvas will have some transforms applied: <svg id="viewport" x="0" y="0" width="100%" height="100%"> <g id="canvas" transform="scale(0.17)"> <image class="imageTile" x="0" y="0" width="256" height="256"/> <image class="imageTile" x="256" y="0" width="256" height="256"/> <image class="imageTile" x="0" y="256" width="256" height="256"/> <image class="imageTile" x="256" y="256" width="256" height="256"/> </g> </svg> #canvas will be draggable,