{"size": 633, "ext": "js", "max_stars_repo_path": "src/transitionsAssist.js", "max_stars_repo_name": "jimobrien/ngFx", "max_stars_repo_stars_event_min_datetime": "2018-01-02T07:38:22.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-14T21:40:15.000Z", "max_issues_repo_path": "src/transitionsAssist.js", "max_issues_repo_name": "alexisohayon/ngFx", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/transitionsAssist.js", "max_forks_repo_name": "alexisohayon/ngFx", "max_forks_repo_forks_event_min_datetime": "2019-12-18T06:26:37.000Z", "max_forks_repo_forks_event_max_datetime": "2019-12-18T06:26:37.000Z"}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 21.8275862069, "max_line_length": 47, "alphanum_fraction": 0.5497630332}
(function (angular) {
  "use strict";
  var timeoutKey = '$$fxtimer';
  angular.module('fx.transitions.assist', [])

  .factory('TransAssist', function ($timeout) {
    function addTimer (el, time, done) {
      var timer = $timeout(function () {
        done();
      }, (time*1000) + 50);
      el.data(timeoutKey, timer);
    }

    function removeTimer (el) {
      var timer = el.data(timeoutKey);
      if (timer) {
        el.css('z-index', '-1');
        $timeout.cancel(timer);
        el.removeData(timeoutKey);
      }
    }

    return {
      addTimer: addTimer,
      removeTimer: removeTimer
    };
  });
}(angular));
