hdpi: fix rendering issue with horizontal sliders and vertical inputs
This commit is contained in:
parent
3402efe0a6
commit
122bf58057
2 changed files with 6 additions and 4 deletions
|
|
@ -125,12 +125,14 @@ module.exports = class Input extends _canvas_base {
|
|||
super.resizeHandle(event)
|
||||
|
||||
if (this.getProp('vertical')){
|
||||
this.ctx.setTransform(1, 0, 0, 1, 0, 0)
|
||||
this.ctx.rotate(-Math.PI/2)
|
||||
this.ctx.translate(-this.height, 0)
|
||||
|
||||
var ratio = CANVAS_SCALING * this.scaling
|
||||
|
||||
this.ctx.setTransform(1, 0, 0, 1, 0, 0)
|
||||
this.ctx.rotate(-Math.PI/2)
|
||||
this.ctx.translate(-this.height * ratio, 0)
|
||||
|
||||
|
||||
if (ratio != 1) this.ctx.scale(ratio, ratio)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ module.exports = class Fader extends _sliders_base {
|
|||
if (this.getProp('horizontal')){
|
||||
this.ctx.setTransform(1, 0, 0, 1, 0, 0)
|
||||
this.ctx.rotate(-Math.PI/2)
|
||||
this.ctx.translate(-this.height, 0)
|
||||
this.ctx.translate(-this.height * ratio, 0)
|
||||
|
||||
if (ratio != 1) this.ctx.scale(ratio, ratio)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue