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

Zoom to mouse cursor #2810

Merged
merged 25 commits into from
Jun 17, 2015
Merged

Zoom to mouse cursor #2810

merged 25 commits into from
Jun 17, 2015

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Jun 12, 2015

Changes the default zoom behavior to zoom to the point under the mouse cursor. #302, #1060

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 12, 2015

In 2D, zoom in close from a global view. It feels too fast once we're close.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 12, 2015

Does this disable inertia for zoom in 2D and Columbus view?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 12, 2015

It seems like zoom inertia shuts off in 3D in some cases too.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 12, 2015

From a default view in 3D, a quick - but reasonable zoom - leads to too much jerk in the zoom path.

@bagnell
Copy link
Contributor Author

bagnell commented Jun 12, 2015

Does this disable inertia for zoom in 2D and Columbus view? It seems like zoom inertia shuts off in 3D in some cases too.

Do you have steps to reproduce this? Does it happen after switching between scene modes? I haven't seen it.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 12, 2015

Seems to happen to all seen modes after doing some middle click drag to 360 rotate around a point of interest.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 12, 2015

It's possible to get into a case like this:

http://localhost:1234/Apps/CesiumViewer/index.html?view=-160.70928356828844%2C-85.24792356385773%2C25857.484674075848%2C262.87914692976483%2C-7.844448971492795%2C329.66711361192637

image

From the home view, I left dragged to a point over the north pole so when I zoomed in the up vector was pointing south, then I went to the south pole.

@@ -161,6 +161,11 @@ defineSuite([
var ellipsoid = Ellipsoid.WGS84;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this enough tests to cover all the new code?

@bagnell
Copy link
Contributor Author

bagnell commented Jun 16, 2015

@pjcozzi This is ready for another look. The zoom in 3D and 2D should be much better. The zoom in Columbus view is the same.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

I got this exception when I took this horizon view in beautiful North Wildwood:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

It takes two or three times to reproduce it, but start at the southeast corner of Wildwood:

http://localhost:1234/Apps/CesiumViewer/?view=-74.8662354080611%2C38.93857671653036%2C153.1966985275658%2C34.14668443896696%2C-17.946594252544585%2C0.11102167973795328

Then right click zoom the northeast tip of the North Wildwood beach and zoom in quickly.

Sometimes it is perfect; sometimes it slides along the ground awkwardly; and one time, it left me around South Carolina.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

Zooming over the north pole makes it easy to get into a situation where middle mouse drag is reversed or the horizon is tilted:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

From the home view in CV, click on Alaska then zoom in:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

Terrain was on in the CV scenario above.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

The CV zoom crash is pretty easy to reproduce on any zoom and without terrain.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

This crash is probably duplicate with the other cartesian is required:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

Can we make this work with 3D models using pickPosition?

@bagnell
Copy link
Contributor Author

bagnell commented Jun 16, 2015

Can we make this work with 3D models using pickPosition?

It already does, but the camera height has to be less than ScreenSpaceCameraController.minimumPickingTerrainHeight.

…ts toward the horizon. Fix zoom in Columbus view.
@bagnell
Copy link
Contributor Author

bagnell commented Jun 16, 2015

@pjcozzi This is ready for another look. I couldn't reproduce many of the crashes after I fixed a couple. I'll try for a little while longer and post if I can.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

I can still reproduce this exception. I was zoomed in to Yosemite with terrain on, then I left click panned a bit to a distant mountain peak, followed by right click zoom to the same peak:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2015

Everything else looks good. This is the only issue left that I can reproduce.

Also, merge in master.

@bagnell
Copy link
Contributor Author

bagnell commented Jun 16, 2015

@pjcozzi This is ready for another look. The last crash is fixed. To reliably reproduce the crash, make sure terrain is on, the sky is at the center of the screen and right click zoom on terrain.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 17, 2015

Looks good!

pjcozzi added a commit that referenced this pull request Jun 17, 2015
@pjcozzi pjcozzi merged commit 11ed792 into master Jun 17, 2015
@pjcozzi pjcozzi deleted the zoom-to branch June 17, 2015 10:52
This was referenced Jun 17, 2015
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.

2 participants