mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
need to set the height of the container to get the pdf spinner working
This commit is contained in:
parent
d6e47c2701
commit
85750dfeb6
2 changed files with 9 additions and 6 deletions
|
@ -21,8 +21,12 @@ define [
|
|||
highlightsElement = $(element).find('.highlights-layer')
|
||||
|
||||
updatePageSize = (size) ->
|
||||
element.height(Math.floor(size[0]))
|
||||
element.width(Math.floor(size[1]))
|
||||
h = Math.floor(size[0])
|
||||
w = Math.floor(size[1])
|
||||
element.height(h)
|
||||
element.width(w)
|
||||
canvasElement.height(h)
|
||||
canvasElement.width(w)
|
||||
scope.page.sized = true
|
||||
|
||||
isVisible = (containerSize) ->
|
||||
|
|
|
@ -175,11 +175,10 @@ define [
|
|||
canvas.removeClass('pdf-canvas-new')
|
||||
|
||||
addSpinner: (element) ->
|
||||
element.css({position: 'relative'})
|
||||
h = element.parent().height()
|
||||
w = element.parent().width()
|
||||
h = element.height()
|
||||
w = element.width()
|
||||
size = Math.floor(0.5 * Math.min(h, w))
|
||||
spinner = $('<div style="position: absolute; top: 50%; left:50%; transform: translateX(-50%) translateY(50%);"><i class="fa fa-spinner fa-spin" style="color: #999"></i></div>')
|
||||
spinner = $('<div style="position: absolute; top: 50%; left:50%; transform: translateX(-50%) translateY(-50%); z-index: 2"><i class="fa fa-spinner fa-spin" style="color: #999"></i></div>')
|
||||
spinner.css({'font-size' : size + 'px'})
|
||||
element.append(spinner)
|
||||
|
||||
|
|
Loading…
Reference in a new issue