Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Kreek is absolutely correct in this comment above. Sets are a workaround for the inconsistencies between SVG and VML.</p> <p>In your example above, you're running into the same issue that you were facing in <a href="https://stackoverflow.com/questions/8117516/apply-hover-event-in-raphael-on-a-set-of-paths">your previous question</a>. Using <strong>this</strong> in an anonymous function will almost always not work in the way you expect, as <strong>this</strong> won't be referring to what you think it is. Have a look at <a href="http://thomasdavis.github.com/tutorial/anonymous-functions.html" rel="nofollow noreferrer">this discussion</a>, particularly the first two comments in the comments section. (As an aside, the commenter uses "self" as the reference to "this", which is much better than my "that", which goes to show there's always someone doing it better than yourself)</p> <p>Anyway, with that in mind, I've <a href="http://jsfiddle.net/amadanNM/4F23u/" rel="nofollow noreferrer">cloned</a> your fiddle, wrapped your set in an object, and put the events into the object constructor. By doing this, the event can then refer to <strong>that.set</strong> and animate all objects in the set at the same time.</p> <p>It's a small but fundamental concept that will aid you throughout any Raphael (or javascript) development you do.</p> <p>This doesn't answer your question directly, but hopefully clarifies some of the issues you seem to be discovering. I can't really comment on the animation calls you've mentioned, but I do think that Raphael as a library is definitely worth persevering with.</p> <p>N.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload