knob: added pips, disabled by default
This commit is contained in:
parent
c40367cdd9
commit
413defbfa8
2 changed files with 23 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ module.exports.options = {
|
|||
width:'auto',
|
||||
height:'auto',
|
||||
color:'auto',
|
||||
noPip:false,
|
||||
noPip:true,
|
||||
compact:false,
|
||||
angle:270,
|
||||
css:'',
|
||||
|
|
@ -51,6 +51,14 @@ Knob = function(widgetData) {
|
|||
this.margin = 0
|
||||
}
|
||||
|
||||
if (!widgetData.noPip) {
|
||||
this.wrapper.append(`
|
||||
<div class="pips">
|
||||
<div>${this.rangeLabels[0]}</div><div>${this.rangeLabels[this.rangeLabels.length-1]}</div>
|
||||
</div>
|
||||
`)
|
||||
}
|
||||
|
||||
this.lastOffsetX = 0
|
||||
this.lastOffsetY = 0
|
||||
this.minDimension = 0
|
||||
|
|
|
|||
|
|
@ -39,4 +39,18 @@
|
|||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
.pips {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
pointer-events: none;
|
||||
div {
|
||||
padding: 0 8%;
|
||||
font-size: 11rem;
|
||||
color: var(--color-text-fade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue