Skip to content

How to show selected star ? #77

@cluebit

Description

@cluebit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions