jquery-stars icon indicating copy to clipboard operation
jquery-stars copied to clipboard

Sometimes the stars are directly under the cursor

Open lukehaas opened this issue 6 years ago • 1 comments

This problem causes hovered elements to flicker and for clicks to occasionally go unregistered.

The problem is caused by the way sideX and sideY are generated. Because the jstar_rand function is given a range of -1 to 1, you end up with a result of -1, 0, or 1, when what you really want is -1 or 1. When this number is zero the star position will be identical to the mouse position.

lukehaas avatar Nov 09 '17 16:11 lukehaas