Loading indicator
This commit is contained in:
parent
830c39d2fb
commit
c976c567d7
BIN
app/assets/images/loader.gif
Normal file
BIN
app/assets/images/loader.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@ -17,6 +17,7 @@ class AsciiIo.PlayerView extends Backbone.View
|
|||||||
createChildViews: ->
|
createChildViews: ->
|
||||||
@$el.append(@terminalView.$el)
|
@$el.append(@terminalView.$el)
|
||||||
@terminalView.afterInsertedToDom()
|
@terminalView.afterInsertedToDom()
|
||||||
|
@terminalView.showLoadingIndicator()
|
||||||
|
|
||||||
@hudView = new AsciiIo.HudView()
|
@hudView = new AsciiIo.HudView()
|
||||||
@$el.append(@hudView.$el)
|
@$el.append(@hudView.$el)
|
||||||
@ -32,6 +33,7 @@ class AsciiIo.PlayerView extends Backbone.View
|
|||||||
@movie.seek(percent)
|
@movie.seek(percent)
|
||||||
|
|
||||||
@movie.on 'movie-loaded', (asciicast) =>
|
@movie.on 'movie-loaded', (asciicast) =>
|
||||||
|
@terminalView.hideLoadingIndicator()
|
||||||
@hudView.setDuration(asciicast.get('duration'))
|
@hudView.setDuration(asciicast.get('duration'))
|
||||||
|
|
||||||
@movie.on 'movie-playback-paused', =>
|
@movie.on 'movie-playback-paused', =>
|
||||||
|
@ -45,6 +45,12 @@ class AsciiIo.TerminalView extends Backbone.View
|
|||||||
height = @$el.height()
|
height = @$el.height()
|
||||||
@$el.css(width: width + 'px', height: height + 'px')
|
@$el.css(width: width + 'px', height: height + 'px')
|
||||||
|
|
||||||
|
showLoadingIndicator: ->
|
||||||
|
@$el.append('<div class="loading">')
|
||||||
|
|
||||||
|
hideLoadingIndicator: ->
|
||||||
|
@$('.loading').remove()
|
||||||
|
|
||||||
renderLine: (n, data, cursorX) ->
|
renderLine: (n, data, cursorX) ->
|
||||||
html = []
|
html = []
|
||||||
prevBrush = undefined
|
prevBrush = undefined
|
||||||
|
@ -50,6 +50,18 @@ $color5: #EDC951;
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
.loading {
|
||||||
|
background-image: url(image-path('loader.gif'));
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
z-index: 10;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
/* background-color: black;*/
|
/* background-color: black;*/
|
||||||
|
Loading…
Reference in New Issue
Block a user