Skip to content
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 #676

Merged
merged 3 commits into from
Feb 9, 2016
Merged

Conversation

tcstewar
Copy link
Collaborator

@tcstewar tcstewar commented Feb 9, 2016

This is just a version of #651 without the horrible mess of a rebasing I accidentally did to it.

@tcstewar
Copy link
Collaborator Author

tcstewar commented Feb 9, 2016

@tbekolay could you take a look at the small fix I made to config.js? The original code wasn't initializing the variable correctly for the case when default_val is set to true and there's nothing in the localstorage.

Other than that, this code looks good to me!

@tcstewar
Copy link
Collaborator Author

tcstewar commented Feb 9, 2016

(and for clarity, here's @bjkomer 's original message on this:)

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

@drasmuss
Copy link
Member

drasmuss commented Feb 9, 2016

I think the issue is that if there is nothing in localStorage then it uses default_val, which is an actual boolean.

@tbekolay
Copy link
Member

tbekolay commented Feb 9, 2016

Ah right, I see. I did a bit of googling after and apparently it is supposed to accept other types of data, but no browsers actually do it now.

But you're right, if the default is true there's a problem. +1 LGMT 🐙 !

tcstewar added a commit that referenced this pull request Feb 9, 2016
Toggle for auto-updating from code editor
@tcstewar tcstewar merged commit c08f6e5 into master Feb 9, 2016
@tcstewar tcstewar deleted the editor-updates2 branch February 9, 2016 18:05
@tcstewar
Copy link
Collaborator Author

tcstewar commented Feb 9, 2016

Yay! Merging....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants