nipplejs
nipplejs copied to clipboard
is it possible to change the smaller circle size ratio with respect to the bigger circle? It's default 50%
Hi, it seems that this part hardcode the 50%.
But if you had some CSS like this :
.nipple .front {
width: 20% !important;
}
The !important
part is the important part here ;)
It will override the one that is written in JS. It's a bit hacky, but I think it would be a solution for you. Tell me if it's enough, and close the issue if so.
Cheers!
Just tested it, it's not possible. Since the movement is based on the size of the front element.
You'll need to create a new option to set the front part size independently.
PR's welcome ;)
see if what I added in commit 853aaf3a4080bbffe0df52d9682517355a50c895 fixes it for you
I use the nipple.raw.position to see how far it is pulled beyond the origin of the nipple, for use as a touchpad, in data-only mode, with no nipple showing. You could then trigger the size of the css dynamically, from js code, when over the 50 (> Math.abs(45))
overriding the size by using scale works for me
.nipple .front {
scale: 1.2 !important;
}