-
Notifications
You must be signed in to change notification settings - Fork 6
Description
New feature request to add a new undo/redo feature to KnetMaps so users can undo their "last network interaction". For example, if the user uses the legend to add more nodes of a certain type to the network or does the same accidentally via the showAll button or the right-click context menu, there should be an easy way to revrt that, preferably with a new Undo button icon on the knetmaps top menubar.
FYI, we already we save last node and edge visibility state when user switches knetmaps from tab to full screen mode. Could extend that to retain that information at all times to undo accidental show/hide of nodes and edges.
Simple undo on shown or hidden nodes/edges should be simple as already when going full screen we check which nodes are last shown (denoted by a shown cyJS class shownEle/ hideEle https://github.com/Rothamsted/knetmaps.js/blob/master/javascript/knet-generator.js#L171 appended to node or edge attributes) ... these are called cyJS selector classes and help us toggling attributes like visibility https://github.com/Rothamsted/knetmaps.js/blob/master/javascript/knet-container.js#L192, blur effect etc.