Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DrawPane not getting multiple mouse down events

    I would like to implement my own version of pinch-zoom.

    To do that I need to know when the user puts two fingers on the screen.

    I am attaching a test case. Run it, and touch the screen with a single finger. There is a log for a mouse down.
    Putting a second finger on the screen (while keeping the first one touching) does not generate an event.
    Attached Files

    #2
    I implemented RightMouseDownHandler and that is called when I touch the second finger. Not what I expected, but it works.

    Next problem: When I touch both fingers and move them in or out, I am not getting calls to the MouseMouseHandler.
    Is there a different handler which would be called in that case?

    Comment


      #3
      Unfortunately, the RightMouseDownHandler is not working as I need it to. It is not giving me the correct location of the second touch.
      Try the attached test case.

      Use one finger to touch around the top middle of the red box. The log will show a y value around 90.
      Lift the finger and touch your thumb around the bottom middle of the red box. The log will show a y value around 500.
      Lift your thumb.

      Now, touch your finger at the top middle and without lifting it, touch the bottom middle with your thumb.
      The y value of the right down event will be close 100 instead of close to 500.

      I need a way to reliably determine the location of the second touch.
      Attached Files

      Comment

      Working...
      X