Skip to content

Conversation

@task-jp
Copy link
Contributor

@task-jp task-jp commented Oct 3, 2025

This change simplifies mouse/touch handling by using pointer-event directly instead of the moved event with dragging state management.

Changes:

  • Backend: Extract delta calculation explicitly for clarity
  • Frontend: Replace moved-based dragging with pointer-event handling
  • Remove drag threshold and dragging state (unnecessary complexity)
  • Simplify mouse cursor logic

Description

(A brief description of the changes in this pull request)

Todos

  • Tests
  • Documentation
  • Changelog Entry (if applicable)

Screenshots

(If applicable, screenshots of the changes)

This change simplifies mouse/touch handling by using pointer-event
directly instead of the moved event with dragging state management.

Changes:
- Backend: Extract delta calculation explicitly for clarity
- Frontend: Replace moved-based dragging with pointer-event handling
- Remove drag threshold and dragging state (unnecessary complexity)
- Simplify mouse cursor logic
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR simplifies mouse/touch handling for pan operations by replacing complex dragging state management with direct pointer event handling. The changes eliminate unnecessary complexity while maintaining the same functionality.

Key changes:

  • Extracted delta calculation in the backend for better code clarity
  • Replaced moved-based dragging with unified pointer-event handling
  • Removed drag threshold and dragging state management

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/slint_maplibre_headless.cpp Extracted delta calculation for map movement
examples/map_window.slint Simplified touch handling by removing dragging state and using pointer events

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@yuiseki yuiseki left a comment

Choose a reason for hiding this comment

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

LGTM!

@yuiseki yuiseki merged commit 124763b into maplibre:main Oct 4, 2025
3 checks passed
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