Skip to content

Add touch device support using Pointer Events API #63

Open
1 of 1 issue completed
Open

Description

@draedful

Problem

Currently, the graph only supports mouse events, making it useless on touch devices.

Solution

Add touch device support using the Pointer Events API.

Plan

  1. Add listening pointer events:
    • In src/components/canvas/graph/index.ts, add listening events: [pointerdown, pointermove, pointerup, pointerleave]. Emit same mouse event on fire these events.
  2. replace listening mouse-events for pointer event in Core-Component.
  3. Mark mouse-events like an deprecated

https://w3c.github.io/pointerevents/#the-pointermove-event

Activity

  1. self-assigned this
    on Apr 3, 2025
  2. added theissue type on Apr 3, 2025
  3. draedful commented on May 25, 2025

    @draedful
    CollaboratorAuthor

    While looking at the current way of doing things, it turned out to be more complicated than it seemed at first. You need to not just listen to the two fingers but also guess what they're going to do next. Plus, actions like tapping, pinching, and dragging can happen at the same time, which can get confusing.

    For this reason, it's better to use a ready-made solution.

    There are many ready-made solutions out there, but they all have the same problem — they don't work well with touch. The most popular one is called hammer.js. It has many forks, and you can choose any of them. 

  4. draedful commented on Jun 6, 2025

    @draedful
    CollaboratorAuthor

    In #92 we support dblick. So in this issues we have

    In a PR #92, we support double-clicking event on graph. But, before the dbclick-event fired two separate click-events.
    We plan to fix it in this issue.

  5. added this to the DevKit milestone on Aug 6, 2025
  6. draedful commented on Aug 6, 2025

    @draedful
    CollaboratorAuthor

    Camera panning should not block page scrolling #96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions