Skip to content

Conversation

@nomad-vagabond
Copy link
Collaborator

resolve #19. Clicking on Sun button preserves lock on the selected asteroid and doesn't remove its orbit. Add 'Reset' button to deselect asteroid and reset view (can also be helpful to restore view from weird camera angles and scales). Earth selection behaviour is intentionally left unchanged as asteroid tracking can be a bit complicated from the Earth-locked view.

…iew. Add reset button to clear lock and orbit.
…n view. Add reset button. Deselect asteroid in main table after reset.
@typpo
Copy link
Owner

typpo commented Aug 19, 2016

Thanks Vadym for this excellent change 👍

Could you help me understand the difference between clearLock and dropLock in the code?

@nomad-vagabond
Copy link
Collaborator Author

dropLock clears selection even if locked_object == null, while original method clearLock skip this action due to this line of code at the top: if (!locked_object) return. I implemented dropLock in order to force clearing selection from resetView method, which emulates absence of lock through declaration locked_object = null at the top. This declaration is needed to reset camera. A bit confusing - I know, but this is how I made it :)
Please do not merge yet for I've just found a little bug in my ResetView method. I hope I'll fix it next week.

@nomad-vagabond
Copy link
Collaborator Author

Done!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clicking on Sun or Earth icons should still show orbit of currently selected asteroid

2 participants