Skip to content

controls fixes - #95

Merged
jsantell merged 1 commit into
masterfrom
controls-fix
Nov 8, 2018
Merged

jsantell merged 1 commit into
masterfrom
controls-fix

Conversation

@jsantell

@jsantell jsantell commented Nov 8, 2018

Copy link
Copy Markdown
Contributor

Limits orbit control zoom out to the framed position, fixes #62, and only swallows events when controls enabled, fixes #56

…only swallows events when controls enabled, fixes #56
@jsantell
jsantell requested a review from cdata November 8, 2018 22:25
Comment thread src/features/controls.js

if (this[$controls]) {
// Zooming out beyond the 'frame' doesn't serve much purpose
// and will only end up showing the skysphere if zoomed out enough

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread src/features/controls.js
new OrbitControls(this[$orbitCamera], this[$scene].canvas);
this[$controls].target.set(0, FRAMED_HEIGHT / 2, 0);
this[$controls].enabled = true;
// Panning performed via right click, two finger move

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this built-in behavior of the component?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@cdata

cdata commented Nov 8, 2018

Copy link
Copy Markdown
Contributor

LGTM 👍 thanks for adding tests!

@jsantell
jsantell merged commit 8d9e657 into master Nov 8, 2018
@jsantell
jsantell deleted the controls-fix branch November 8, 2018 23:01
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.

Limit OrbitControls? Enabling controls prevents scrolling

2 participants