PencilCode / jquery-turtle

Turtle Graphics for JQuery
Other
44 stars 25 forks source link

Is there any kind of "reset()" or "clear()" function ? #103

Closed MarkusBordihn closed 8 years ago

MarkusBordihn commented 8 years ago

For my use case I loading jquery and the jquery-turtle library one time and want to reused it for several movements.

$(q).home() works great to reset the position, but I don't found any function which remove the drafted lines / shapes or everything besides the turtle so that I could start with an clean screen without reloading the window or content.

davidbau commented 8 years ago

There is a cs() "clear screen" function. Does it do what you want?

MarkusBordihn commented 8 years ago

Unfortunately its killing the turtle (custom image) as well. Is there an easy way to regenerate the custom turtle image ?

Basically I need cs() with the option to keep the turtle (custom image).

davidbau commented 8 years ago

There is a cg() to just clear the "graphics" surface, which leaves text and turtles alone. Does that do the trick for you

On Tue, Jan 19, 2016 at 2:10 PM, Markus Bordihn notifications@github.com wrote:

Unfortunately its killing the turtle (custom image) as well. Is there an easy way to regenerate the custom turtle image ?

Basically I need cs() with the option to keep the turtle (custom image).

— Reply to this email directly or view it on GitHub https://github.com/PencilCode/jquery-turtle/issues/103#issuecomment-172954833 .

MarkusBordihn commented 8 years ago

Does the trick. Thanks a lot. ;)