rubyx-debugger/app/instruction_view.rb
Torsten Ruger 228b1b5832 slight improvement on the register view
still lagging, but …
2015-07-26 13:24:00 +03:00

30 lines
458 B
Ruby

class InstructionView
include React::Component
required_param :interpreter
required_param :instruction
define_state :active => ""
before_mount do
check_active interpreter.instruction
end
def check_active i
active! instruction == i ? "active" : ""
end
def instruction_changed old , ins
check_active ins
end
def render
return unless instruction
div :class => active do
instruction.to_s
end
end
end