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

centering changes #239

Merged
merged 4 commits into from
Oct 16, 2023
Merged

centering changes #239

merged 4 commits into from
Oct 16, 2023

Conversation

RokasEl
Copy link
Collaborator

@RokasEl RokasEl commented Oct 13, 2023

c now centers on the bounding sphere of current frame if no atoms selected

initiallly center the camera on the bounding sphere on start up

added event.js file to improve code organisation

@PythonFZ, I didn't move the other events to the event.js but should be easy to do, and would make the code a bit cleaner.

`c` now centers on the bounding sphere of current frame if no atoms selected

initiallly center the camera on the bounding sphere on start up

added event.js file to improve code organisation
@RokasEl RokasEl requested a review from PythonFZ October 13, 2023 11:05
@RokasEl RokasEl marked this pull request as ready for review October 13, 2023 11:07
Copy link
Member

@PythonFZ PythonFZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the idea of the event.js and I think this will make the code much easier to read in the longterm. I have two small comments which should be fixed / discussed.

In general great addition, thanks!

zndraw/static/World/World.js Outdated Show resolved Hide resolved
zndraw/static/World/components/particles.js Outdated Show resolved Hide resolved
RokasEl and others added 2 commits October 13, 2023 16:37
Now center corresponds to overall center if no atoms are selected and to the center of selected atoms otherwise

Also inverted the if loop in World since the if part was empty
@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2023

Codecov Report

Merging #239 (a48188e) into main (a0c0209) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #239   +/-   ##
=======================================
  Coverage   48.75%   48.75%           
=======================================
  Files           7        7           
  Lines         281      281           
=======================================
  Hits          137      137           
  Misses        144      144           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@RokasEl
Copy link
Collaborator Author

RokasEl commented Oct 13, 2023

@PythonFZ check the newest version. This changes the Atoms object, make sure you're happy with that. Should not affect overall performance but adds a nice indexing functionality. Might be useful elsewhere?

@PythonFZ PythonFZ self-requested a review October 15, 2023 16:29
Copy link
Member

@PythonFZ PythonFZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@PythonFZ PythonFZ merged commit 33d1316 into main Oct 16, 2023
4 checks passed
@PythonFZ PythonFZ deleted the 238-camera-centering branch October 16, 2023 14:33
@RokasEl RokasEl mentioned this pull request Oct 17, 2023
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.

3 participants