fader: fix hdpi scaling with compact width optimization

This commit is contained in:
jean-emmanuel 2017-04-27 16:53:21 +02:00
parent c299c92f09
commit 054efebc83

View file

@ -158,14 +158,18 @@ module.exports = class Fader extends _sliders_base {
}
resizeHandle(){
super.resizeHandle(...arguments)
if (this.widgetData.compact) {
if (this.widgetData.horizontal) {
this.canvas[0].setAttribute('height', 1)
} else {
this.canvas[0].setAttribute('width', 1)
super.resizeHandle(...arguments)
if (this.widgetData.compact) {
if (this.widgetData.horizontal) {
this.canvas[0].setAttribute('height', 1)
} else {
this.canvas[0].setAttribute('width', 1)
}
}
}
if (CANVAS_SCALING != 1) this.ctx.scale(CANVAS_SCALING, CANVAS_SCALING)
}