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

DIRECTION_NONE on swipe #72

Open
ScallyGames opened this issue May 25, 2016 · 0 comments
Open

DIRECTION_NONE on swipe #72

ScallyGames opened this issue May 25, 2016 · 0 comments

Comments

@ScallyGames
Copy link

ScallyGames commented May 25, 2016

I have a swipe listener with <tag hm-swipe="$ctrl.swipe" hm-recognizer-options='[{"type": "swipe", "directions": "DIRECTION_ALL"}]'> and when it fires I get a parameter object with param.direction = 1 (DIRECTION_NONE).

I've read through the hammer.js source and the only reason of this happening is when deltaX === deltaY. On my object however I have param.deltaX = 229 and param.deltaY = -59.

It is hard to create a MCVE for this but for now I can at least a simplified version of the event params (from that alone it doesn't seem to do what the source code says)

{
    "angle": -14.447590714840283,
    "center": 
    {
        "x":321,
        "y":404
    },
    "deltaTime":616,
    "deltaX":229,
    "deltaY":-59,
    "direction":1,
    "distance":236.47832881682837,
    "isFinal":true,
    "isFirst":false,
    "maxPointers":1,
    "offsetDirection":4,
    "overallVelocity":0.3717532467532468,
    "overallVelocityX":0.3717532467532468,
    "overallVelocityY":-0.09577922077922078,
    "pointerType":"touch",
    "rotation":0,
    "scale":1,
    "type":"swipe",
    "velocity":0,
    "velocityX":0,
    "velocityY":0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant