fader: implement touchZone for compact design
This commit is contained in:
parent
9e4d1419e3
commit
da3b7ff2d2
1 changed files with 4 additions and 1 deletions
|
|
@ -123,7 +123,8 @@ class Fader extends Slider {
|
|||
horizontal = this.getProp('horizontal'),
|
||||
snap = this.getProp('snap')
|
||||
|
||||
if (zone == 'all' || design == 'compact') return true
|
||||
if (zone == 'all') return true
|
||||
if (design == 'compact' && zone == 'gauge') return true
|
||||
|
||||
var x = e.offsetX,
|
||||
y = e.offsetY,
|
||||
|
|
@ -133,6 +134,8 @@ class Fader extends Slider {
|
|||
knobHeight = this.cssVars.knobSize,
|
||||
knobWidth = design ? knobHeight : knobHeight * .6
|
||||
|
||||
if (design == 'compact') knobWidth = this.width
|
||||
|
||||
if (horizontal) [knobWidth, knobHeight] = [knobHeight, knobWidth]
|
||||
|
||||
// add extra tolerance pixels
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue