Repository navigation
ResearchLoom v4.3.4 - Xiaomi Pad 7 Dynamic Scaling, Dual Eraser & Stylus Scheme
Highlights
ResearchLoom v4.3.4 introduces dedicated responsive scaling and hardware optimization for Android tablets (specifically the Xiaomi Pad 7 with a 3:2 aspect ratio, 2880×1800 resolution), Dual-Mode Erasers (Stroke Eraser vs. Pixel Eraser), and hardware integration for the Xiaomi Smart Pen 2 / Focus Pen barrel button scheme.
What Changed in v4.3.4
1. Dynamic Tablet Scaling & Orientation Adaptation
- Xiaomi Pad 7 (3:2 Aspect Ratio) & All Tablet Ratios: Dynamically scales and recalculates canvas layout in both vertical (portrait) and landscape orientations.
- Zero UI Truncation: Eliminated header and toolbar button clipping. On tablet viewports (width < 1280px), the sidebar auto-collapses by default with a quick-toggle button in the header, and redundant secondary badges are cleanly collapsed.
- Dynamic DPR-Aware Canvas: Drawing coordinate matrix scales precisely to window.devicePixelRatio during orientation changes.
2. Dual-Engine Eraser
- Stroke Eraser: High-precision vector line intersection calculation using segment-distance algorithms (distToSegment), instantly deleting entire intersected strokes on contact.
- Pixel Eraser: Raster canvas erasure using destination-out composite operation, enabling pixel-perfect partial erasing and fine-tuned formula cleanup.
- Sub-Menu Selector: Toggle between Stroke and Pixel eraser modes directly from the toolbar or via stylus secondary click.
3. Xiaomi Smart Pen & Stylus Hardware Button Scheme
- Native Android Key Interception (MainActivity.java):
- Captures KEYCODE_PAGE_UP (92) and KEYCODE_PAGE_DOWN (93) emitted by Xiaomi Smart Pen 2 / Focus Pen barrel buttons.
- Intercepts MotionEvent.ACTION_BUTTON_PRESS for BUTTON_STYLUS_PRIMARY and BUTTON_STYLUS_SECONDARY.
- Bridges hardware events directly into the web canvas via custom events and window.handleStylusButton without unwanted browser scrolling.
- Hardware Button Toggle: Holding or clicking the physical pen barrel button toggles the eraser mode on the fly while sketching.
Assets Included
- ResearchLoom-android-tablet.apk: Dedicated standalone APK for Android tablets.
- ResearchLoom.exe: Standalone Windows desktop build.
- ResearchLoom-windows-x64.zip: Portable zip package for Windows.
- ResearchLoom-macOS-arm64.dmg: Drag-and-drop installer for Apple Silicon macOS.