-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update act2model.json #1
base: master
Are you sure you want to change the base?
Conversation
The bug is fixed.The second atom is restored to its earlier position when reshown and does not disturb the first atom when hidden.However I have used a very crude method of storing the position parameters of the second atom.I stored them in velocity of the first atom as it didn't create any problem.the fix can be improved by using global variables to store the position parameter.
There is a lot of noise in the diff. Probably because you pasted in what was saved by interactive editor. Can you start with the original file in git, and then just change the part that needs to be changed to fix the issue? You can either click the edit button again on the original file. Which will make a new pull request. Or you can clone your fork of lab-interactive-site locally and then revise or amend the commit in your patch-1 branch, and force push it back to your fork on github. Do that will update this pull request. |
Is there a reason you did not use new parameters to store this value. The use of an atom's vx and vy was a creative solution, but not one we would want to merge unless there were not a way to use the parameters to store this. You can define your own parameters and these act like global variables. Take a look at how the parameters are used in some other interactives. -Dan On Mar 15, 2014, at 11:45 AM, prasht63 wrote:
|
} | ||
], | ||
"propertiesToRetain": [], | ||
"parameters": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the section where parameters are defined. Only name and initialValue are required. Here is where you could define parameters to store the position of the second atom.
You use get('parameter-name') and set('parameter-name', value) to work with them. Here is an example of an interactive that uses a lot of parameters: http://lab.concord.org/interactives.html#interactives/inquiry-space/1-pendulum.json
Hi
I am trying it this way but I think the buffer_x and buffer_y parameters are not global in their scope , because when onChange function gets triggered it gives a error message that buffer_x , buffer_y are not defined. Can you correct me where I am going wrong? |
You need to use the set and get functions I described above. See the example interactive I referenced to see those functions in action. |
I fixed the bug as you suggested , going to submit a pull request. |
New directory structure for norwegian nynorsk
Update breaking-molecular-bond.json
Pull from Concord (contains Greek 5-amino-acids.json)
0ae8009
to
10a0b84
Compare
The bug is fixed.The second atom is restored to its earlier position when reshown and does not disturb the first atom when hidden.However I have used a very crude method of storing the position parameters of the second atom.I stored them in velocity of the first atom as it didn't create any problem.the fix can be improved by using global variables to store the position parameter.