Hide progress bar after 300ms
This commit is contained in:
parent
10b46db524
commit
70cf67498b
1 changed files with 6 additions and 1 deletions
|
@ -1,14 +1,19 @@
|
|||
class Loading
|
||||
constructor: ->
|
||||
if window.show_loadingscreen then @showScreen()
|
||||
@timer_hide = null
|
||||
|
||||
|
||||
setProgress: (percent) ->
|
||||
if @timer_hide
|
||||
clearInterval @timer_hide
|
||||
$(".progressbar").css("width", percent*100+"%").css("opacity", "1").css("display", "block")
|
||||
|
||||
hideProgress: ->
|
||||
console.log "hideProgress"
|
||||
$(".progressbar").css("width", "100%").css("opacity", "0").hideLater(1000)
|
||||
@timer_hide = setTimeout ( =>
|
||||
$(".progressbar").css("width", "100%").css("opacity", "0").hideLater(1000)
|
||||
), 300
|
||||
|
||||
|
||||
showScreen: ->
|
||||
|
|
Loading…
Reference in a new issue