PencilCode / jquery-turtle

Turtle Graphics for JQuery
Other
44 stars 25 forks source link

Copy method #91

Closed yanamal closed 9 years ago

yanamal commented 9 years ago

Hi David, Here is the copy method branch, but it is still unfinished: the turtles are not copying the shell, and there is some ugliness with having to manually copy some properties.

davidbau commented 9 years ago

Be sure to add your new "copy" function to the list of expected function names in the test that failed. The test is designed to make sure that we don't leak any additional names that are unexpected.

davidbau commented 9 years ago

Clean code snippets from stack overflow -

You can recopy all attributes using this: http://stackoverflow.com/questions/6753362/jquery-how-to-copy-all-the-attributes-of-one-element-and-apply-them-to-another

And clone the canvas: http://stackoverflow.com/questions/3318565/any-way-to-clone-html5-canvas-element-with-its-content

yanamal commented 9 years ago

I think it's ready now!

davidbau commented 9 years ago

Thanks yana!