Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] On the doubletap function and tap function used at the same time to generate a delay solution #1116

Open
heninua opened this issue Oct 25, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@heninua
Copy link

heninua commented Oct 25, 2024

We just move the onTap of GestureDetector to the Listener, and we can add the hover functionality as well

// src/ui/pluto_base_cell.dart

 void _handleOnTapUp(PointerDownEvent details) {
    _addGestureEvent(PlutoGridGestureType.onTapUp, details.position);
  }

  void _handleOnHover(PointerHoverEvent details) {
    _addGestureEvent(PlutoGridGestureType.onHover, details.position);
  }

Listener(
      onPointerHover: _handleOnHover,
      onPointerDown: _handleOnTapUp,
      child: GestureDetector(
        behavior: HitTestBehavior.translucent,
        // Essential gestures.
        onLongPressStart: _handleOnLongPressStart,
        onLongPressMoveUpdate: _handleOnLongPressMoveUpdate,
        onLongPressEnd: _handleOnLongPressEnd,
        // Optional gestures.
        onDoubleTap: _onDoubleTapOrNull(),
        onSecondaryTapDown: _onSecondaryTapOrNull(),
        child: _CellContainer(
          cell: cell,
          rowIdx: rowIdx,
          row: row,
          column: column,
          cellPadding: column.cellPadding ??
              stateManager.configuration.style.defaultCellPadding,
          stateManager: stateManager,
          child: _Cell(
            stateManager: stateManager,
            rowIdx: rowIdx,
            column: column,
            row: row,
            cell: cell,
          ),
        ),
      ),
    );
@heninua heninua added the enhancement New feature or request label Oct 25, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This issue is stale because it has been open for 30 days with no activity. label Nov 24, 2024
@stan-at-work
Copy link

Why is this needed ?

@heninua
Copy link
Author

heninua commented Dec 8, 2024

GestureDetector has a delay when using onTap and onDouble at the same time

Why is this needed ?

@github-actions github-actions bot removed the stale This issue is stale because it has been open for 30 days with no activity. label Dec 8, 2024
@stan-at-work
Copy link

GestureDetector has a delay when using onTap and onDouble at the same time

Why is this needed ?

I thought that was fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants