I have two shapes rather groups which are draggable.
When the blue group is dragged it should not overlap the yellow group.
heres the fiddle http://jsfiddle.net/bittu4u4ever/3Kprr/
i tried doing some getIntersections
but im really a noob in kinetic.js.
You may think getIntersections() will get you the colliding objects, I thought so too, but it's not true. It only gives intersecting CHILDREN(not all) objects of the container.
You can run collision detection logic on your rectangles and/or groups. The following link is how to detect collision on rectangles. You may apply this into your code when a rectangle is dragged.
Fast rectangle to rectangle intersection
Here is my function of how I detect collision on two rectangles with KineticJS.
You may already know this, but in case;
Hope it helps