mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
23 lines
No EOL
591 B
CoffeeScript
23 lines
No EOL
591 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.controller "AutoCompileOnboardingController", ($scope) ->
|
|
recompileBtn = angular.element('#recompile')
|
|
popover = angular.element('.onboarding__autocompile')
|
|
{ top, left } = recompileBtn.offset()
|
|
|
|
if $scope.ui.pdfWidth < 475
|
|
$scope.placement = 'left'
|
|
popover.offset({
|
|
top: top,
|
|
left: left - popover.width()
|
|
})
|
|
else
|
|
$scope.placement = 'right'
|
|
angular.element('.onboarding__autocompile').offset({
|
|
top: top,
|
|
left: left + recompileBtn.width()
|
|
})
|
|
|
|
$scope.dismiss = () ->
|
|
$scope.onboarding.autoCompile = 'dismissed' |