function startAutoHide() {
          var autoHideTimer, cancelAutoHide = angular.noop;

          if (options.hideDelay) {
            autoHideTimer = $timeout(service.hide, options.hideDelay) ;
            cancelAutoHide = function() {
              $timeout.cancel(autoHideTimer);
            };
          }

          // Cache for subsequent use
          options.cancelAutoHide = function() {
            cancelAutoHide();
            options.cancelAutoHide = undefined;
          };
        }
function startAutoHide() {
          var autoHideTimer, cancelAutoHide = angular.noop;

          if (options.hideDelay) {
            autoHideTimer = $timeout(service.hide, options.hideDelay) ;
            cancelAutoHide = function() {
              $timeout.cancel(autoHideTimer);
            };
          }

          // Cache for subsequent use
          options.cancelAutoHide = function() {
            cancelAutoHide();
            options.cancelAutoHide = undefined;
          };
        }
function startAutoHide ( ) { var autoHideTimer , cancelAutoHide = angular . noop ; if ( options . hideDelay ) { autoHideTimer = $timeout ( service . hide , options . hideDelay ) ; cancelAutoHide = function ( ) { $timeout . cancel ( autoHideTimer ) ; } ; } // Cache for subsequent use options . cancelAutoHide = function ( ) { cancelAutoHide ( ) ; options . cancelAutoHide = undefined ; } ; }
If auto-hide is enabled, start timer and prepare cancel function
If auto - hide is enabled start timer and prepare cancel function
Starts auto - hiding the image