having a SVG inline an HTML document , with a viewbox "x y w h". How can I check if an element is inside the view box?
by saying element it could be a nested child path inside a group and so on ...
so I think I'm looking for a build in function of SVG ,or a quick fast why to check it.
I've tried saving the viewbox cords ,and the element I want to check if it's inside the viewbox I did something like :
while (parent ! the svg element ...)
{
parent = get elem parent
}
// now I have the most top parent of this element ,inside the svg doc now check if parent inside viewbox , if true then child also , otherwise false