myems-admin/js/angular/angular-touch.js
Function bind
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bind: function(element, eventHandlers, pointerTypes) {
// Absolute total movement, used to control swipe vs. scroll.
var totalX, totalY;
// Coordinates of the start position.
var startCoords;
Function makeSwipeDirective
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeSwipeDirective(directiveName, direction, eventName) {
ngTouch.directive(directiveName, ['$parse', '$swipe', function($parse, $swipe) {
// The maximum vertical delta for a swipe should be less than 75px.
var MAX_VERTICAL_DISTANCE = 75;
// Vertical distance should not be more than a fraction of the horizontal distance.