I have an object like this which has SVG rectangles like below,
Rectangle-obj = [{ 'x' : 10, 'y' : 10, 'width' : 200, 'height' : 200}.......]
Those rectangles will append in a single main rectangle..
(x:0, y: 0, width: 300, height: 300)
I need to check whether it has been colliding with another element, and if it collides, need to place that collided rectangle smartly.
How to achieve this, is there any function available?