Skip to content

WASM: Alt + LMB drag does not multi-select shapes #220

Description

@trailcode

Summary

On the desktop build, holding Alt and left-mouse dragging in the 3D view draws a selection rectangle and multi-selects shapes (OCCT AIS_ViewController rubber-band / SelectRectangle gesture with Aspect_VKeyFlags_ALT).

On the WASM / Emscripten build, the same gesture does not multi-select shapes.

Reproduction

  1. Open the WASM app (e.g. GitHub Pages demo or local Emscripten build).
  2. Load or create several solids so more than one is visible in Normal mode.
  3. Hold Alt, press LMB, and drag a rectangle over multiple shapes.
  4. Release LMB.

Expected: Shapes inside the rectangle are selected (same as desktop).
Actual: Multi-select via Alt+LMB drag does not work on WASM.

Notes / likely touch points

  • Modifier mapping already exists: Occt_view::key_flags_from_glfw_ maps GLFW_MOD_ALTAspect_VKeyFlags_ALT; mouse move uses key_flags_from_glfw_window_() (src/gui_occt_view.cpp).
  • Input path: GLFW callbacks in src/main.cppGUI::on_mouse_buttonOcct_view::PressMouseButton / UpdateMousePosition.
  • Browser / Emscripten often mishandle Alt (menu focus, altKey on pointer events, glfwGetKey for Alt). Confirm whether mods on press and live Alt state during drag are both present under WASM.
  • Related umbrella: Hot keys #93 (Emscripten / web hotkeys and input follow-up).

Acceptance criteria

  • WASM: Alt + LMB drag rectangle-selects multiple shapes like desktop.
  • Desktop behavior unchanged.
  • Docs mention Alt+drag multi-select (and any remaining Web caveats) in usage.md / usage-occt-view.md as appropriate.
  • Notes or fix recorded under agents/plans/wasm-alt-drag-multiselect.md.

Related

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions