Skip to content

Added strokeStyle option to crosshair plugin to allow color choice.#955

Merged
mirabilos merged 1 commit intodanvk:masterfrom
rishabhkohli:master
Jan 25, 2023
Merged

Added strokeStyle option to crosshair plugin to allow color choice.#955
mirabilos merged 1 commit intodanvk:masterfrom
rishabhkohli:master

Conversation

@rishabhkohli
Copy link
Contributor

I needed this functionality for my graphs because I am working in a dark theme. The default color was hardly visible.

Maybe the option should be called 'color' instead of strokeStyle, or maybe color can be an object inside strokeStyle
But I let it remain consistent with the current variables for now.

What do you think?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 90.178% when pulling 364a8c8 on rishabhkohli:master into da2a028 on danvk:master.

this.canvas_ = document.createElement("canvas");
opt_options = opt_options || {};
this.direction_ = opt_options.direction || null;
this.strokeStyle = opt_options.strokeStyle || "rgb(0,0,0,0.3)";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rgba

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"rgba(0, 0, 0, 0.3)" to be exact

@mirabilos mirabilos merged commit dde8c08 into danvk:master Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants