fix classes, status wasn't updating

This commit is contained in:
Torsten Ruger
2018-04-17 19:20:31 +03:00
parent ce0bdc46a9
commit e193d50efd
4 changed files with 9 additions and 10 deletions

View File

@ -12,7 +12,7 @@ class MomView < ListView
end
def start_view
ConstantView.new( "span.bright" , "starting" )
ConstantView.new( "span.mom_bright" , "starting" )
end
def instruction_changed

View File

@ -11,12 +11,12 @@ class RiscView < ListView
end
def start_view
ConstantView.new( "span.bright" , "starting" )
ConstantView.new( "span.risc_bright" , "starting" )
end
def instruction_changed
@element.at_css(".bright").remove_class("bright")
instruction = append_view( ConstantView.new( "span.bright" , instruction_text ) )
@element.at_css(".risc_bright").remove_class("risc_bright")
instruction = append_view( ConstantView.new( "span.risc_bright" , instruction_text ) )
wrap_node_with instruction , div
remove_first if( @elements.length > 6)
end

View File

@ -49,7 +49,7 @@ class StatusView < ElementView
def update
@interpreter.tick
@element.at_css(".clock").text = clock_text
@element.at_css(".state").text = state_text
@element.at_css(".header_state").text = state_text
@element.at_css(".flags").text = flags_text
@element.at_css(".stdout").text = @interpreter.stdout
end