define [ "base" ], (App) -> App.factory 'pdfSpinner', [() -> class pdfSpinner constructor: () -> # handler for spinners add: (element) -> h = element.height() w = element.width() size = Math.floor(0.5 * Math.min(h, w)) spinner = $('
') spinner.css({'font-size' : size + 'px'}) element.append(spinner) stop: (element) -> element.find('.fa-spin').removeClass('fa-spin') remove: (element) -> element.find('.fa-spin').remove() ]