A few additions I created in light of my request for #69 . This implementation adds a KeyTraversal class to GTE.UI, with a few tweaks for non-interference with the rest of the application. It uses postorder traversal for the nodes, while for the multilines it traverses from top to bottom.
Key Changes:
Added css to allow user to know which nav button they're tabbed over
Added KeyConstants.js to allow for readable keycodes in KeyTraversal
Added minified KeyConstants, KeyTraversal files to index.html
Implemented the KeyTraversal class.
Constructor instantiates an "active node" and "active multi" to null, and sets the current mode to node traversal just as a default (there exists a multi traversal mode and a no traversal mode)
Methods have been documented to state their purpose, key idea is that a handler function uses a switch case to decide which node/multi to hover over
Up/down keys are used to traverse nodes, "x" key is currently used to traverse multilines, both blur any focus in the navbar
Tab key tabs to DOM flow; whenever tab key is pressed, KeyTraversal is effectively disabled, while whenever up/down/x is pressed, tab focus is blurred (this makes sure a keypress meant for the canvas isn't pressing a button in the nav, and vice versa)
Space key is used to simulate a click
Concerns:
Pressing 'x' during iset labelling may trigger multiline hover, will probably replace have to replace with a multikey trigger
After creating a tree, labelling the nodes, merging the isets, and then pressing the add button again to add more nodes, any addition of nodes afterwards changes the order of the traversal in an unexpected way; will have to be investigated for the next patch
A few additions I created in light of my request for #69 . This implementation adds a KeyTraversal class to GTE.UI, with a few tweaks for non-interference with the rest of the application. It uses postorder traversal for the nodes, while for the multilines it traverses from top to bottom.
Key Changes:
Concerns: