-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toggle for auto-updating from code editor #651
Conversation
Nifty! And I like how clean the implementation is.... :) I'm still not sure what the right hot-key should be for updating the netgraph. Any suggestions? I'm also not sure about the icon, but I'm having trouble finding a better one... |
Argh; this needs to get updated for the persistent storage stuff that got merged already. |
Maybe glyphicon-circle-arrow-left ? |
Ah, we have a wiki page for more icons! https://github.com/nengo/nengo_gui/wiki/Icon-Libraries |
Fixed link.
The bulk of the logic is in `static/config.js`. So far we only persist the 4 configuration options accessible through the gear icon in the top toolbar, but we can add more things easily. A few other related changes: - Changed several attributes to properties with a getter/setter in netgraph.js so that you don't have to remember to fire off a `set_` or `update_` function when changing them. - Cleaned up the configuration modal code. - Added a test to ensure that changing things persists in local storage. Pair programmed with: Dan Rasmussen <drasmuss@uwaterloo.ca>
This persists three additional items related to the code editor: 1. Whether it is shown or hidden. 2. The width of the code editor. 3. The font size used in the editor. Additionally, we refactored the code significantly, removing several functions that were only called once, and making several functions into a property's getter/setter. Also removed a very strange line of code that set the global Nengo.ace in the Nengo.Ace constructor. Pair programmed with: Dan Rasmussen <drasmuss@uwaterloo.ca>
e605d31
to
196940b
Compare
Grr, looks like I screwed up the rebase on this one. :( I'm going to make a new branch with just the actual content of this PR. Sorry about complicating things! |
I've made a new PR for this based on current master: #676 |
This got merged as #676 (same content, but with a cleaner history than this one, due to a mess I made) |
Adding the option to disable automatic synchronization of the model and the code in the editor.
Which shortcut keys to use is still up in the air, currently using Ctrl-Shift-1 to toggle auto-updating, and Ctrl-1 to trigger an update. The toggle can also be set in the config, and the trigger with a tool bar button (which also doubles as an indicator of whether or not the code differs from the model).
Addresses #644 and also provides a way around #444 #550
Allowed Shift-Enter to run the model from the editor window (also works in the other windows). Addresses #639