henryksloan / sugarcubes

A library and tool for automata and formal languages, inspired by JFLAP
https://henryksloan.github.io/sugarcubes/
GNU Affero General Public License v3.0
26 stars 2 forks source link

Transition context menu #6

Closed henryksloan closed 3 years ago

henryksloan commented 3 years ago

Added a context menu for transitions. The process of drawing transitions now returns the containing rectangles for each of the symbols. Right clicking one of these symbols opens a context menu, currently only allowing deletion.

In the future, it might be nice to include editing transitions in the context menu. This would involve adding state to indicate whether a transition is being added or edited, and then either the add_transition or a new update_transition function. The input_box could also pop up at the position of the symbol that was right clicked on.