Dragging collisions
问题 I am pretty new to both CANVAS and Kineticjs but I feel what I am attemping should be much easier then I am making it out to be. Basically this is what I have so far: The code I am attempting to use is from kineticjs Stop drag to a shape when overlaps with another solution but was unable to get it to work. Please check the live jsfiddle code var isRectCollide = function(target, box) { if (target.x - target.width >= box.x + box.width && target.y - target.height >= box.y + box.height && target