knob: better vertical centering when label==false

This commit is contained in:
jean-emmanuel 2017-04-26 21:35:27 +02:00
parent 21d5220864
commit 1875370376

View file

@ -146,7 +146,7 @@ module.exports = class Knob extends _sliders_base {
if (this.widgetData.compact) {
this.canvas[0].style.top = this.input[0].style.marginTop = (this.minDimension) * this.lostHeightFactor - (this.widgetData.label === false ? 0 : this.gaugeWidth / 4) + 'px'
} else {
this.canvas[0].style.top = Math.min((this.minDimension) * this.lostHeightFactor - this.margin * PXSCALE / 2, this.input.outerHeight() * .5) + 'px'
this.canvas[0].style.top = Math.min((this.minDimension) * this.lostHeightFactor - (this.widgetData.label === false ? 0 : this.margin * PXSCALE / 2), this.input.outerHeight() * .5) + 'px'
}
}