0

I am using the Raphael JS graphics/animation library. I have a Raphael canvas and two circles, as defined in the following code

var paper = Raphael(0, 0, screen.width, screen.height);

var smallCircle = paper.circle(200, 200, 20)
.attr({
    "fill": "#red"
});

var largeCircle = paper.circle(500, 200, 60)
.attr({
    "fill": "#blue"
});

I'd like to use the onDragOver function such that when I click and drag the smallCircle over the largeCircle, an alert or some other event happens. I am confused by the Raphael documentation, however, and do not quite know how to implement the onDragOver function. Can someone please give me an example of implementing this function (preferably using my variables)? Thanks all!

IntegrateAllDay
  • 165
  • 1
  • 4
  • 12
  • Wondering if this previous answer here http://stackoverflow.com/questions/8903717/raphael-detect-overlapped-elements-when-drag-and-drop will help. – Ian Feb 24 '14 at 09:40
  • The closest thing to tutorials provided by Baranovskiy himself are his "demos" -- no explanation, but lots of functional code. Check out the graffle demo here: http://raphaeljs.com/graffle.html – Kevin Nielsen Feb 24 '14 at 16:44

0 Answers0