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

Objects Leave Play Area When Fully Zoomed In #334

Closed
JRomero0613 opened this issue Jun 1, 2020 · 7 comments
Closed

Objects Leave Play Area When Fully Zoomed In #334

JRomero0613 opened this issue Jun 1, 2020 · 7 comments

Comments

@JRomero0613
Copy link

For phetsims/qa#505 on both the "model" and "to scale" screens the systems with the sun have their orbiting objects leave the play area when fully zoomed in. To see this in action go to either screen and select a system with the sun (first or second options), use the slider in the upper left corner to fully zoom in, and hit the play button to allow the orbit to process. Once the orbiting object reaches the top of the screen it will leave the play area, and the "return objects" button will appear. This happens on both screens for both systems with the sun without making any modifications to the objects masses or other simulation parameters, I think that this should not be the case and simulation parameters should have to be modified for the objects to leave the play area. By making the play area a little bigger or decreasing the magnification of the zoom option it would prevent this from occurring. I know this is a small detail so I'll leave it up to the developers if they want to address it.

@samreid
Copy link
Member

samreid commented Jun 2, 2020

@arouinfar how do you recommend to proceed?

@samreid samreid assigned arouinfar and unassigned samreid Jun 2, 2020
@arouinfar
Copy link
Contributor

arouinfar commented Jun 4, 2020

@samreid this behavior is somewhat present in latest, though the Earth doesn't always completely leave the frame. I think shifting the grid in #327 exacerbated the problem.

By making the play area a little bigger or decreasing the magnification of the zoom option it would prevent this from occurring.

I agree @JRomero0613.

@samreid let's reduce the maximum zoomLevelProperty to 1.4 for the sun-containing scenes.

UPDATE: This should be done for the upcoming dev version.

@arouinfar arouinfar assigned samreid and unassigned samreid and arouinfar Jun 4, 2020
@samreid
Copy link
Member

samreid commented Jun 8, 2020

More questions on this before I proceed:

  1. Currently there is one zoom level applied to all of the scenes. It could take some work to make it so each scene can have an independent zoom level. But I wonder if that would be confusing--for instance, wouldn't users expect that max zoom is the same in different scenes?

  2. I tried changing the max zoom to 1.4 and found the planet (in star/planet) still left the dev bounds at full zoom. Turning the max zoom down to 1.17 kept everything within bounds.

  3. Changing the max zoom to 1.17 and leaving the default and minimum zoom means the slider starts up like so:

image

Maybe we should allow the user to zoom in far enough that some objects go out of view?

@arouinfar what do you recommend?

@samreid samreid assigned arouinfar and unassigned samreid Jun 8, 2020
@samreid
Copy link
Member

samreid commented Jul 1, 2020

Moving to high priority since this is one of (or the only?) remaining issue before 2nd dev test.

@arouinfar
Copy link
Contributor

Currently there is one zoom level applied to all of the scenes. It could take some work to make it so each scene can have an independent zoom level. But I wonder if that would be confusing--for instance, wouldn't users expect that max zoom is the same in different scenes?

Oh, that's a good point. I think it'd be preferable to keep the zoom ranges the same across all scenes.

I tried changing the max zoom to 1.4 and found the planet (in star/planet) still left the dev bounds at full zoom. Turning the max zoom down to 1.17 kept everything within bounds.

I must not have had the sim iframe in studio at the proper aspect ratio when I came up with 1.4. Testing at the dev aspect ratio, it seems like 1.3 could work. The planet briefly leaves the visible bounds, but isn't gone long enough to trigger the Return Objects button.

Changing the max zoom to 1.17 and leaving the default and minimum zoom means the slider starts up like so:
Maybe we should allow the user to zoom in far enough that some objects go out of view?

@samreid let's try 1.3 instead.

@arouinfar arouinfar assigned samreid and unassigned arouinfar Jul 7, 2020
samreid added a commit that referenced this issue Jul 10, 2020
@samreid
Copy link
Member

samreid commented Jul 10, 2020

In the commit, I reduced the max zoom to 1.3. @arouinfar can you please review on phettest?

@samreid samreid assigned arouinfar and unassigned samreid Jul 10, 2020
@arouinfar
Copy link
Contributor

@samreid looks good in master. At max zoom, the Return Objects button does get briefly triggered in the StarPlanetMoonScene, but I think it's still an improvement and retains a more useful range for custom orbits.

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

No branches or pull requests

3 participants