Giter VIP home page Giter VIP logo

angular-hammer's Introduction

Angular Hammer

Within an Angular.js application, allows you to specify custom behaviour on Hammer.js touch events.

Usage, currently as attribute only:

hm-tap="{expression}"

You can change the default settings for the instance by adding a second attribute with options:

hm-options="{drag: false, transform: false}"

Include the angular-hammer.js file, and add hmTouchEvents to your app’s dependencies.

Requires Hammer.js, tested with v1.0.1 - 2013-02-26.

This repo is largely unmaintained, but will accept pull requests. Also ngTouch might serve some of your needs... so check that out.

angular-hammer's People

Contributors

aaron3 avatar mckean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

angular-hammer's Issues

typo in README.md

README.md contains the sentence

Include the angular-hammer.js file, and add hmTouchevents to your app’s dependencies.

which should reference hmTouchEvents, not hmTouchevents

README Typo

Hey,

you've written in your README that one has to define the module hmTouchEvents as dependency. Your module is named hmTouchevents (with lower e). Just wanted to let you know this :-)

Triggers all hm attributes in the document

When I change the ng-click to hm-tap the first button (with the hm-tap attribute) seem to trigger the all hm-tap attributes on the page not only the one for the button being pressed and the other buttons does not trigger anything.
Is this a bug or have I done something wrong?

event on parent will trigger event on ALL children

The dom is like:

<div id="parent" ng-controller="myApp.ctrl.Parent" hm-swipe="parentSwipe()">
    <ul id="child" ng-controller="myApp.ctrl.Children">
        <li ng-repeat="brd in boards" hm-tap="childTap(brd)">{{brd.name}}</li>
    </ul>
</div>

If there is no hm-swipe on parent, all works as expected.

But after I added hm-swipe to parent, if I tap one of the children, taps of all children will be triggered.

And if its ng-click on parent, everything is OK.

You can see it here: http://jsfiddle.net/hbrls/L3TJ5/.

I'm not sure if it's an issue here or I misused angular and hammer. Could you please help me to find out?

Pressing shift+click on Mac, Chrome browser breaks.

Hello!!

We're using hammer in our application and I've seen that when the user presses shift+click (in this order), the browser throws an error page.

This success happens only the first time this action is executed and we've detected it only in Mac system.

Any idea?

Thanks.

hm-action disables hammerjs events on the site

I have a partial view that is used in ngView and javascript under <script> tag in partial html does not work. Do you know why?
index.html

partial.html

Tap me

<script> $('#myId').hammer().on("tap", function(event) { alert("dsadadas"); }); </script>

hold event only triggered once?

I am not sure if this is an issue of hammer.js itself or of this integration. The symptom is: after one successful "hold" event a second hold action does not trigger an event.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.