raphaeljs drag and drop
问题 I am using rapaeljs for my web app. I want to set dropable boundries of the object. Object can move in dropable area. Once an object come in dropable area, there should be no way out for the object. 回答1: Raphael has built in drag and drop support through .drag() . Use it in the form element.drag(start, move, up); Where the 3 arguments are 3 function references to the functions you write that deal with the mousedown, movement, and mouseup events respectively. Note how this.ox and this.oy is