aterrien / jQuery-Knob

Nice, downward compatible, touchable, jQuery dial
http://anthonyterrien.com/knob/
MIT License
5.04k stars 1.24k forks source link

Input display position is off for narrow viewports #378

Open belg4mit opened 5 months ago

belg4mit commented 5 months ago

If I have a narrow window, such as an older phone e.g; 500px; the input field is positioned far to the right of the control, outside of the current viewport, like this:

Screenshot 2024-05-29 144635

belg4mit commented 5 months ago

Here is a partial fix (for a 150x150 knob) that makes the control usable, you'll need to adjust as needed: jQuery('.ControlContainer > div').css({ "position": "relative", "display": "block" }); jQuery('.ControlContainer input').css({"top": "50%", "margin-top": "-25px", "left": "50%", "margin-left": "-40px" });