Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show selected star ? #77

Open
cluebit opened this issue Sep 6, 2020 · 0 comments
Open

How to show selected star ? #77

cluebit opened this issue Sep 6, 2020 · 0 comments

Comments

@cluebit
Copy link

cluebit commented Sep 6, 2020

Thanks to all who made this little wonderful program. Thank you.

What I am saying here is NOT an issue, may be a new feature request or simply my ignorance of figuring out things.

Whenever user clicks on the canvas, I am trying to visually indicate the selected star.
On click we can find the nearest object like as follows (extracted from samples provided) ::

'click': function(e){
				e.nearest = e.data.sky.nearestObject(e.x,e.y);
				console.log(e.nearest,e.ra,e.dec);
			}

...so, now we know the star user is trying to select, but how to show user, the star he selected. i.e visually indicating the selected star.

Checked addPointer method source, we can draw over the star by changing the label, but feeling inappropriate.
if(this.pointers[i].ra == input.ra && this.pointers[i].dec == input.dec && this.pointers[i].label == input.label) matched = i;

I know little-bit of JavaScript, I appreciate any ideas/pointers/directions to highlight star(s) on canvas.

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

No branches or pull requests

1 participant