I'm having trouble with a fairly basic function. I'm trying
to change the colour of a line that will act as a scale bar over an
image from a microscope. Students have to choose between a white
bar or a black bar depending on the selection of a radio button.
I've written the code to listen for the selection and put the
function for choosing the colour inside the function that draws the
line, but it keeps selecting the first colour in the "if"
statement, that is It's tracing "the line is black" even before
clicking a radio button. It will trace a change in the selectedData
colour but doesn't change the colour of the line.
I'm sure it's something really obvious; I'd really appreciate
a fresh look at this.