Disable flatmap tilt by default; respect allow_tilt checkbox in controls#618
Open
Disable flatmap tilt by default; respect allow_tilt checkbox in controls#618
Conversation
When allow_tilt is unchecked (default), shift+click-and-drag and middle-click-and-drag on the flatmap now pan instead of tilting. The altitude and azimuth are locked to the flat-on view (0.1 and 180 respectively) when tilt is disabled in flat mode. The allow_tilt checkbox now properly propagates its state from the surface uniform to the movement controls via an event dispatch. Fixes: #517 Agent-Logs-Url: https://github.com/gallantlab/pycortex/sessions/580eced4-5c6c-4b98-904d-148721550d07 Co-authored-by: mvdoc <6150554+mvdoc@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gallantlab/pycortex/sessions/580eced4-5c6c-4b98-904d-148721550d07 Co-authored-by: mvdoc <6150554+mvdoc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove flatmap tilt functionality in WebGL viewer
Disable flatmap tilt by default; respect allow_tilt checkbox in controls
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
allow_tiltcheckbox only toggled a shader uniform but never gated the actual mouse controls. Shift+drag and middle-drag on flatmaps always tilted regardless of the checkbox state.Changes
movement.js: AddallowTiltproperty (defaultfalse) toLandscapeControls. When false andmix == 1:update(): shift/middle-drag dispatches topaninstead ofrotatesetAltitude(): clamps to 0.1° (flat-on)setAzimuth(): locks to 180° (flat-on)mriview_surface.js: Replace direct uniform setter withsetAllowTilt()that sets the uniform and dispatches anallowTilteventmriview.js: WireallowTiltevent from surface to controls (same pattern asmixevent)defaults.cfg: Addallow_tilt = falseto[webgl_viewopts]When
allow_tiltis checked, the original tilt behavior is fully restored.