0

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?

Fabian Schultz
  • 18,138
  • 5
  • 49
  • 56
Akbar Basha
  • 1,168
  • 1
  • 16
  • 38
  • What have you tried so far? Could you please add some of your code so we have a better chance of helping you? – Fabian Lauer Dec 26 '16 at 06:17
  • Possible duplicate of [Event when two SVG elements touch](http://stackoverflow.com/questions/5396657/event-when-two-svg-elements-touch) – Ivan Chaer Dec 28 '16 at 20:33

0 Answers0