mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-04 14:49:01 +02:00
need to set the height of the container to get the pdf spinner working
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user