emptying container on new game to remove flicker (hopefully)

This commit is contained in:
Rudis Muiznieks 2014-07-02 16:55:12 -05:00
parent 5797639f99
commit 42f380b1ec
1 changed files with 1 additions and 0 deletions

View File

@ -66,6 +66,7 @@ class Player
if @container.find('a:not(.disabled):not(.external)').length == 0 if @container.find('a:not(.disabled):not(.external)').length == 0
@container.append @converter.makeHtml '## The End\n\nYou have reached the end of this story. <a id="restart" href="">Click here</a> to start over.' @container.append @converter.makeHtml '## The End\n\nYou have reached the end of this story. <a id="restart" href="">Click here</a> to start over.'
$('#restart').click -> $('#restart').click ->
@container.empty()
player = new Player @story, @id player = new Player @story, @id
$("##{@id}").data 'player', player $("##{@id}").data 'player', player
player.play() player.play()