biodiv / contactjs

Pointer gestures for your webapp
MIT License
77 stars 6 forks source link

V2.0 #19

Closed biodiv closed 2 years ago

biodiv commented 2 years ago

v2.0 now covers every functionality the original contactjs covered, and has two new PoinerListener options: consecutiveGestures (boolean) and simultaneousGestures (boolean).

Because the project has been restructured for better readability and maintainability, reviewing it by comparing it to the previous versions through changes is difficult. The biggest change is the replacement of Contact.ts with PointerManager.ts.

I suggest performing the manual tests (including dual pointer gestures) and simply looking at the code.

What is still missing is building a vanilla JS contact.min.js which is not a module and was provided for earlier versions. I could not figure out how to build it using parcel. Parcel is great and we should probably stick with it in my opinion.

SE2Dev commented 2 years ago

@biodiv I merged main into this branch, to resolve the merge conflicts that were showing up. Most of this branch looks fine, but I think we should make the constraints work a bit more like the constraints seen when using navigator.devices.getUserMedia() for the sake of consistency. This should allow us to have a clearer set of constraint definitions with regards to types.

I can make a pass at cleaning up formatting, etc. if you want - since I see a few places where we could probably be catching issues.

biodiv commented 2 years ago

Sounds great, feel free to clean up - thanks !:)

Regarding the constraints (->mdn), do you mean something like

const tap = new Tap(domElement, {
  global : {
    duration: {
      max: 600
    }
  }
})

when configuring a recognizer?

SE2Dev commented 2 years ago

Regarding the constraints (->mdn), do you mean something like

const tap = new Tap(domElement, {
  global : {
    duration: {
      max: 600
    }
  }
})

when configuring a recognizer?

Yes, that way all of the constraint values for a given parameter are kept in one place, rather than in two separate dictionaries.