jQuery-Knob icon indicating copy to clipboard operation
jQuery-Knob copied to clipboard

data value is not in middle of knob when using rtl

Open jimmyheller opened this issue 10 years ago • 3 comments

when using rtl direction in page , data value is not in the middle of knob and would be printed in left side with distance and sometimes it would be out of parent element.

jimmyheller avatar Jan 01 '16 09:01 jimmyheller

I solved this by simply adding the following to the input. style="display:inline;"

It's not stupid if it works :)

sorenmp3 avatar Nov 08 '16 13:11 sorenmp3

@jimmyheller I solve this problem with this code in draw function

  $(".knob").knob({
            draw: function () {
               //style rtl
                this.i.css({
                    'margin-right': '-' + ((this.w * 3 / 4 + 2) >> 0) + 'px',
                    'margin-left': 'auto'
                });
            },
        });

mortezakarimi avatar May 09 '17 12:05 mortezakarimi

Thank you @mortezakarimi , your solution worked for us too.

JavaTMP avatar Mar 10 '18 13:03 JavaTMP