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

Pan and pan start event #12

Open
RomainFrancony opened this issue Jun 1, 2018 · 0 comments
Open

Pan and pan start event #12

RomainFrancony opened this issue Jun 1, 2018 · 0 comments

Comments

@RomainFrancony
Copy link

Hello, thanks for this wrapper!

When trying to add panstart or panleft events alone, it failed with error invalid direction and they are not called.

But if you set the pan event, they will be called at the right timing (panstart on the first event and panleftwhen panning on the left.

Could it be possible to have the panstart event alone please.

Here a simple example to try it, remove the v-hammer:pan="pan" line and see how no other event are called.

<template>
  <div id="app"
  v-hammer:pan="pan"
  v-hammer:panstart="panStart"
  v-hammer:panleft="panLeft">
  </div>
</template>

<script>

export default {
  name: 'app',
  methods: {
    panStart(e) {
      console.log('Pan start called');
    },
    pan(e) {
      console.log('Pan called');
    },
    panLeft(e) {
      console.log('Pan left called');
    }
  }
}
</script>

<style>
#app {
  height: 100vh;
}
</style>
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