gap-packages / francy

An Interactive Discrete Mathematics Framework for GAP

Home Page:https://gap-packages.github.io/francy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

messages on canvas not removable

chpech opened this issue · comments

Hi Manuel,
I am implementing an interface for coco2p to francy and came upon a problem when removing messages using a callback. I attached a minimal example for the explanation:

tstfrancymsg.g.gz

  • When adding msg1 and immediately removing it, it remains on the screen.
  • When adding msg1 and msg2 and then removing msg1 the msg1 is removed. Trying to remove msg2 afterwards remains unsuccessful.
  • When adding msg1 and msg2 and the remove both at once, nothing happens
  • When adding msg1 and remove it and the add msg2, then msg2 overwrites msg1

It seems that francy is not always redrawing the screen when removing a message.

Best,
Christian

Hi Christian,

I remember doing something hacky to handle messages, because the communication between the frontend and the kernel is not fully duplex. I mean, when a user click to close a message dialog, it does not propagate to the kernel, hence when it gets rendered again in the browser D3 will have the previous state and not render it again (I think this was the design I chose).

I'll replicate with you instructions and try to fix accordingly.

Thanks for your feedback!

Manuel

I'll try to look into this for the next release.

Fixed all the bugs reported on this issue plus implemented a close message callback for all messages created (when a message is closed on the GUI it will destroy it on gap as well).