- w/ fastclick, w/o angular-touch : 355-365ms
- w/o fastclick, w/o angular-touch : idem
- w/o fastclick, w/ angular-touch : idem
          Last active
          January 2, 2016 20:29 
        
      - 
      
- 
        Save abulte/8357438 to your computer and use it in GitHub Desktop. 
    Test fast click efficiency on mobile
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | module.directive('mesureTime', function() { | |
| return { | |
| restrict: 'A', | |
| // require: 'ngModel', | |
| link: function(scope, elm, attrs, ctrl) { | |
| var timeTouch; | |
| elm.on('click', function() { | |
| if (timeTouch) { | |
| alert(new Date().getTime() - timeTouch, " ms"); | |
| } else { | |
| alert("timetouch is undefined"); | |
| } | |
| return false; | |
| }).on('touchend', function() { | |
| timeTouch = new Date().getTime(); | |
| }); | |
| } | |
| }; | |
| }); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <div mesure-time class="topcoat-button center full">Mesurer</div> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment