electronicwhisper / recursive-drawing

568 stars 77 forks source link

recursion incorrectly applied. #3

Closed coldnebo closed 12 years ago

coldnebo commented 12 years ago

This seems odd, but perhaps is "by design" in some way?

  1. drag a square into a new canvas
  2. drag the canvas into itself (voila! recursion) ...but!....
  3. drag a circle into the recursing canvas.

The circle also recurses, even though it was in no way "dragged onto itself" during the process.

This seems like a bug?

(reproduced in Safari 5.17 and Firefox 15 on Mac OSX 10.7.4)

coldnebo commented 12 years ago

Nevermind, I was thinking the wrong way about the recursion... it's not per-instance of the shape, it's per-frame -- dragging into itself keeps the recursive relation no matter what other shapes are dragged into it. I was able to achieve the thing I was trying to do by:

  1. dragging a circle into a new canvas
  2. dragging the canvas into itself
  3. dragging a square into a new canvas
  4. dragging #2 onto #3.

The result is a square with a recursive circle collection next to it.