Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The coders are able to set the tracer’s colors to anything they want!
Since I use the style background color attribute on the div it can
accept a wide variety of values for the background color.
I first wanted to pass in some color value when calling notify or
select but then I realized there is a lot of issues with the amount of
parameters. So I thought of doing some sort of global set like the
HTML canvas/context does.
Tracer now has 5 new methods for setting the colors.
_set(name)FillColor(color_goes_here).
Valid color formats (must be passed in as strings):
The logic of setting/using the fillColor methods should be similar to the canvas/context fillStyle. It will keep using that color until the color is switched again.
Example:
tracer._select( j )._wait(); // default background color
tracer._setSelectFillColor('orange') // will be orange until changed
tracer._select( k )._wait(); // orange background color
I had to change the clear method inside array2d.js also to handle the
new coloring change.