wzr1337 / angular-gestures

AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.
MIT License
509 stars 100 forks source link

Recognizer check fails on direct reference comparison #56

Open booleanbetrayal opened 6 years ago

booleanbetrayal commented 6 years ago

I'm seeing the following after upgrading an older project's angular-gestures package to include the new recognizer check added via #41 . Specifically, the line where the direct function reference comparison is made. You can see in this debug output that there is a PanRecognizer defined (2nd entry) but it fails the comparison.

screen shot 2018-09-13 at 12 09 17 pm

I'm including hammer.js and angular-gestures.js once, so I'm not sure what's creating this reference difference. Maybe making it more resilient by relying on the function name property instead makes sense though?