Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ UI :
* font : font family.
* fontWeight : font weight.
* bgColor : background color.
* rtl : default=false | true=displays the input properly for right-to-left languages (Arabic, Hebrew, etc.). Requires displayInput=true.

Hooks
-------
Expand Down
9 changes: 7 additions & 2 deletions js/jquery.knob.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
inline : false,
step : this.$.data('step') || 1,
rotation: this.$.data('rotation'),
rtl: false,

// Hooks
draw : null, // function () {}
Expand Down Expand Up @@ -700,13 +701,12 @@
) + 2;

this.o.displayInput
&& this.i.css({
&& (this.i.css({
'width' : ((this.w / 2 + 4) >> 0) + 'px'
,'height' : ((this.w / 3) >> 0) + 'px'
,'position' : 'absolute'
,'vertical-align' : 'middle'
,'margin-top' : ((this.w / 3) >> 0) + 'px'
,'margin-left' : '-' + ((this.w * 3 / 4 + 2) >> 0) + 'px'
,'border' : 0
,'background' : 'none'
,'font' : this.o.fontWeight + ' ' + ((this.w / s) >> 0) + 'px ' + this.o.font
Expand All @@ -715,6 +715,11 @@
,'padding' : '0px'
,'-webkit-appearance': 'none'
})
&& this.i.css(
this.o.rtl ? 'margin-right' : 'margin-left'
, '-' + ((this.w * 3 / 4 + 2) >> 0) + 'px'
)
)
|| this.i.css({
'width' : '0px'
,'visibility' : 'hidden'
Expand Down