knob/fader: right click / long touch triggers value input focus
This commit is contained in:
parent
f0d7e83e92
commit
7dc078cbd4
4 changed files with 33 additions and 1 deletions
|
|
@ -148,6 +148,14 @@ module.exports.create = function(widgetData,container) {
|
|||
widget.updateUi(gauge.size)
|
||||
})
|
||||
|
||||
wrapper.on('mousedown',function(e){
|
||||
if (e.button==2 && !EDITING) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
input.focus()
|
||||
}
|
||||
})
|
||||
|
||||
wrapper.on('mousewheel',function(e){
|
||||
if (e.originalEvent.wheelDeltaX) return
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,14 @@ module.exports.create = function(widgetData,container) {
|
|||
mask[0].setAttribute('style',`height:${w}px;width:${w}px;padding-bottom:0`)
|
||||
})
|
||||
|
||||
wrapper.on('mousedown',function(e){
|
||||
if (e.button==2 && !EDITING) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
input.focus()
|
||||
}
|
||||
})
|
||||
|
||||
wrapper.on('mousewheel',function(e){
|
||||
if (e.originalEvent.wheelDeltaX) return
|
||||
|
||||
|
|
|
|||
|
|
@ -1849,6 +1849,14 @@ module.exports.create = function(widgetData,container) {
|
|||
widget.updateUi(gauge.size)
|
||||
})
|
||||
|
||||
wrapper.on('mousedown',function(e){
|
||||
if (e.button==2 && !EDITING) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
input.focus()
|
||||
}
|
||||
})
|
||||
|
||||
wrapper.on('mousewheel',function(e){
|
||||
if (e.originalEvent.wheelDeltaX) return
|
||||
|
||||
|
|
@ -2097,6 +2105,14 @@ module.exports.create = function(widgetData,container) {
|
|||
mask[0].setAttribute('style',`height:${w}px;width:${w}px;padding-bottom:0`)
|
||||
})
|
||||
|
||||
wrapper.on('mousedown',function(e){
|
||||
if (e.button==2 && !EDITING) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
input.focus()
|
||||
}
|
||||
})
|
||||
|
||||
wrapper.on('mousewheel',function(e){
|
||||
if (e.originalEvent.wheelDeltaX) return
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Sliders are unidimensional widgets that output one value at a time.
|
|||
#### `compact`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: set to `true` to display a compact alternative for the widget. Enables `noPips` and disables mouse/touch focusing on the value display.
|
||||
- usage: set to `true` to display a compact alternative for the widget. Enables `noPips` and disables default mouse/touch focusing on the value display (right-click/long-touch still triggers it).
|
||||
|
||||
|
||||
#### `range`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue