From e193d50efd0b324cae93d29715e7168e77dee33c Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 17 Apr 2018 19:20:31 +0300 Subject: [PATCH] fix classes, status wasn't updating --- assets/css/app.css.sass | 9 ++++----- lib/views/mom_view.rb | 2 +- lib/views/risc_view.rb | 6 +++--- lib/views/status_view.rb | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/assets/css/app.css.sass b/assets/css/app.css.sass index 0075eae..92d5403 100644 --- a/assets/css/app.css.sass +++ b/assets/css/app.css.sass @@ -19,10 +19,10 @@ body @include span(18%) .mom_view - @include span(18%) + @include span(20%) .risc_view - @include span(18%) + @include span(24%) .status_view @include span(14%) @@ -79,12 +79,11 @@ body background-color: #009900 -.bright +.risc_bright , .mom_bright padding-right: 6px padding-left: 6px background-color: #00E3FF - -moz-border-radius: 7px - -webkit-border-radius: 7px + border-radius: 7px .fade_in diff --git a/lib/views/mom_view.rb b/lib/views/mom_view.rb index e6fc6ae..d41f01c 100644 --- a/lib/views/mom_view.rb +++ b/lib/views/mom_view.rb @@ -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 diff --git a/lib/views/risc_view.rb b/lib/views/risc_view.rb index a7309dd..b9aca4f 100644 --- a/lib/views/risc_view.rb +++ b/lib/views/risc_view.rb @@ -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 diff --git a/lib/views/status_view.rb b/lib/views/status_view.rb index d3af565..6666160 100644 --- a/lib/views/status_view.rb +++ b/lib/views/status_view.rb @@ -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