Get Mouse Click Position
I am using this color wheel, and I want to add a black cover overlay to the color wheel, this way when the hsv's value changes (the v) using the slider under the color wheel, the c
Solution 1:
Add this to the last script tag (just after var c = ...
):
var w = document.getElementById('wrapper');
then You can get and substract the wrapper offset properties:
currentX = e.pageX - w.offsetLeft - c.offsetLeft - radiusPlusOffset || currentX;
currentY = e.pageY - w.offsetTop - c.offsetTop - radiusPlusOffset || currentY;
Post a Comment for "Get Mouse Click Position"