Limit horizontal scaling in sub-titles

This commit is contained in:
LoveEevee
2018-11-10 23:10:48 +03:00
parent b6552ea25f
commit 7d91721ce8
2 changed files with 4 additions and 3 deletions

View File

@@ -394,12 +394,13 @@
var scaling = 1
if(config.height && drawnHeight > config.height){
scaling = config.height / drawnHeight
if(config.align === "bottom"){
scaling = Math.max(0.6, config.height / drawnHeight)
ctx.translate(40 * mul, 0)
ctx.scale(scaling, scaling)
ctx.scale(scaling, config.height / drawnHeight)
ctx.translate(-40 * mul, 0)
}else{
scaling = config.height / drawnHeight
ctx.scale(1, scaling)
}
if(config.selectable){