Add more options
This commit is contained in:
parent
5e70adb511
commit
a55cddaa53
3 changed files with 85 additions and 3 deletions
|
@ -236,9 +236,14 @@ TouchBar.TouchBarScrubber = class TouchBarScrubber extends TouchBarItem {
|
|||
super()
|
||||
if (config == null) config = {}
|
||||
const {items} = config
|
||||
let {onSelect, onHighlight} = config
|
||||
let {onSelect, onHighlight, selectedStyle, highlightedStyle, showArrowButtons, continuous, mode} = config
|
||||
this.type = 'scrubber'
|
||||
this._addLiveProperty('items', items)
|
||||
this._addLiveProperty('selectedStyle', selectedStyle || null)
|
||||
this._addLiveProperty('overlayStyle', highlightedStyle || null)
|
||||
this._addLiveProperty('showArrowButtons', showArrowButtons || false)
|
||||
this._addLiveProperty('mode', mode || 'free')
|
||||
this._addLiveProperty('continuous', continuous || true)
|
||||
|
||||
if (typeof onSelect === 'function' || typeof onHighlight === 'function') {
|
||||
if (onSelect == null) onSelect = () => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue