kiliancs
Repos
36
Followers
14
Following
17

Rails I18n de-facto standard library for ActiveRecord model/data translation.

2115
462

RSpec's 'test double' framework, with support for stubbing and mocking

1103
332

CSV Decoding and Encoding for Elixir

449
84

An adapter for using Timex DateTimes with Ecto

159
67

Phoenix and Timex integration

3
5

Events

issue comment
Zoom pinch spasming

My attempt at a fix #1639.

Created at 2 days ago
pull request opened
feat(zoom): prevent wheel interfering with pinch

:bug: Bug Fix

  • Prevent wheel interfering with pinch

    Using a macbook, a touchpad pinch gesture will trigger useGesture's pinch event, as desired, but it will also trigger the wheel event. Except in Safari.

    With this change, the wheel event handler bails if a pinch gesture is ongoing.

    Tested in Firefox, Chrome and Safari on a macbook.

    Fixes: #1638

Created at 2 days ago

feat(zoom): prevent wheel interfering with pinch

Using a macbook, a touchpad pinch gesture will trigger useGesture's pinch event, as desired, but it will also trigger the wheel event. Except in Safari.

With this change, the wheel event handler bails if a pinch gesture is ongoing.

Fixes: #1638

Created at 2 days ago
create branch
kiliancs create branch user/kilianc/fix_zoom_spasms
Created at 2 days ago
Created at 2 days ago
issue comment
Zoom pinch spasming

One thing to try is to ignore wheel events while pinching, similar to how it's done in onDrag:

      onDrag: ({ event, pinching, cancel }) => {
        if (pinching) { // <----
          cancel();
          dragEnd();
        } else if (!(event instanceof KeyboardEvent)) {
          dragMove(event);
        }
      },
Created at 2 days ago
issue comment
Zoom pinch spasming

I have noticed that the wheel handler (handleWheel) is fired when pinching, as is handlePinch. Occasionally, the two events scale in the opposite direction, causing the issue.

Created at 2 days ago
opened issue
Zoom pinch spasming

The zoom example in https://airbnb.io/visx/zoom-i demonstrates the issue.

https://user-images.githubusercontent.com/98786/214480791-32a4b3bf-d9bb-4776-82e8-9e13fde43cc5.mov

I'm seeing this in Firefox and Chrome, but not Safari, while using the pinch gesture using the touchpad.

Created at 2 days ago