{"size": 731, "ext": "js", "max_stars_repo_path": "src/js/can-touch/gesture.js", "max_stars_repo_name": "tappily/can-touch", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/js/can-touch/gesture.js", "max_issues_repo_name": "tappily/can-touch", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/js/can-touch/gesture.js", "max_forks_repo_name": "tappily/can-touch", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.2272727273, "max_line_length": 97, "alphanum_fraction": 0.462380301}
define(['jquery','can/control'], function ($, c) {
    'use strict';
    return c.extend({
        '{events.move}': function (el, ev) {
            if(this.options.preventDefault) {
                ev.preventDefault();
            }
            var touch = this.options.model.attr('touch');
            if(touch) {
                touch.update(ev);
                $(ev.target).trigger('onetouchmove', [touch]);
            }
        },
        '{events.cancel}': function (el, ev) {
            var touch = this.options.model.attr('touch');
            if(touch) {
                touch.cancel();
                $(ev.target).trigger('onetouchcancel', [this.options.model.removeAttr('touch')]);
            }
        }
    });
});