Svg - hide an element when leaving the group area, similar to css overflow hidden

I need to make a field on the canvas (a), outside of which there are witch elements that are invisible.

Similar to overflow: hidden; in css.

Note. Inside there are draggable items. I need to be able to drag them, but if they get out of the box (something like a camera’s focus), I need them not to be displayed (or their parts, if part inside, part outside), as I said just like overflow : is hidden.

Note 2: I cannot use other elements to cover the area around the window (please do not make me explain why if it is absolutely necessary (I don’t know how to say it briefly, so I will add photos and a lot of words) :)) .

+5
source share
1

<svg> : . <svg> , . <g> , / .

+9

All Articles