CindyJS icon indicating copy to clipboard operation
CindyJS copied to clipboard

Animation

Open JHM27 opened this issue 8 years ago • 7 comments

Trying to animate a figure. In CindyJS the separate figures all appear until the mouse is moved. It looks as though the wait() function is not working, and possible the empty layer() function.

NumberLine Movements.zip

JHM27 avatar Sep 27 '17 07:09 JHM27

  1. wait and emptylayer are indeed not implemented yet.
  2. Please make sure all variables you use are properly initialized. I get warnings about chge and CMarkPt being used before having been initialized.
  3. Furthermore, I see warnings about conditions not being boolean expressions, where you use .pressed and .selected. I am not sure if these accessors are implemented yet or what else is the problem.
  4. You have got a typo autoclearlayer(2,falase);, where I read falase to mean false.

I am running out of time right now, but will look into the issue later on. Meanwhile, maybe you can address some of the points above?

kranich avatar Sep 27 '17 13:09 kranich

In Cinderella, emptylayer is an undocumented alias for clearlayer. Until that alias is implemented in CindyJS, please use clearlayer instead.

kranich avatar Sep 27 '17 16:09 kranich

In #219, @gagern suggested to use settimeout instead of wait. Apparently, we have no example demonstrating settimeout yet. It takes a delay in seconds as its first argument, and the code to be executed as its second argument.

kranich avatar Sep 27 '17 17:09 kranich

autoclearlayer has not been implemented either, but has already been used in examples/157_football-prognosis.html

kranich avatar Sep 27 '17 17:09 kranich

@JHM27 There is a line ButF.xy=ButClear.xy+[0,-1.5];. CindyJS spits a warning that ButClear is undefined. You probably mean ButClearInstns.

kranich avatar Sep 27 '17 17:09 kranich

Neither accessor .selected nor function isselected seem to have been implemented yet.

kranich avatar Sep 27 '17 17:09 kranich

Thanks Stefan, much appreciated

JohnM

On 27 Sep 2017, at 18:22, Stefan Kranich <[email protected]mailto:[email protected]> wrote:

autoclearlayer has not been implemented either, but has already been used in examples/157_football-prognosis.htmlhttps://github.com/CindyJS/CindyJS/blob/master/examples/157_football-prognosis.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CindyJS/CindyJS/issues/633#issuecomment-332594164, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AV-0b35crjxeoIkwG5NDCjY901RIe0u1ks5smoRngaJpZM4PlUR-.

JHM27 avatar Sep 28 '17 08:09 JHM27