Commit 7d91721c authored by LoveEevee's avatar LoveEevee

Limit horizontal scaling in sub-titles

parent b6552ea2
...@@ -10,7 +10,7 @@ Still in developement. Works best with Chrome. ...@@ -10,7 +10,7 @@ Still in developement. Works best with Chrome.
Create a SQLite databse named `taiko.db` with the following schema: Create a SQLite databse named `taiko.db` with the following schema:
CREATE TABLE "songs" ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `title` TEXT NOT NULL, `title_en` TEXT, `easy` INTEGER, `normal` INTEGER, `hard` INTEGER, `oni` INTEGER, `ura` INTEGER, `enabled` INTEGER NOT NULL, `category` INTEGER, `type` TEXT , `offset` REAL NOT NULL ) CREATE TABLE "songs" ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `title` TEXT NOT NULL, `title_en` TEXT, `subtitle` TEXT, `subtitle_en` TEXT, `easy` INTEGER, `normal` INTEGER, `hard` INTEGER, `oni` INTEGER, `ura` INTEGER, `enabled` INTEGER NOT NULL, `category` INTEGER, `type` TEXT , `offset` REAL NOT NULL )
CREATE TABLE "categories" ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `title` TEXT NOT NULL, `title_en` TEXT NOT NULL ) CREATE TABLE "categories" ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `title` TEXT NOT NULL, `title_en` TEXT NOT NULL )
When inserting song rows, leave any difficulty columns as NULL if you don't intend to add notecharts for them. When inserting song rows, leave any difficulty columns as NULL if you don't intend to add notecharts for them.
......
...@@ -394,12 +394,13 @@ ...@@ -394,12 +394,13 @@
var scaling = 1 var scaling = 1
if(config.height && drawnHeight > config.height){ if(config.height && drawnHeight > config.height){
scaling = config.height / drawnHeight
if(config.align === "bottom"){ if(config.align === "bottom"){
scaling = Math.max(0.6, config.height / drawnHeight)
ctx.translate(40 * mul, 0) ctx.translate(40 * mul, 0)
ctx.scale(scaling, scaling) ctx.scale(scaling, config.height / drawnHeight)
ctx.translate(-40 * mul, 0) ctx.translate(-40 * mul, 0)
}else{ }else{
scaling = config.height / drawnHeight
ctx.scale(1, scaling) ctx.scale(1, scaling)
} }
if(config.selectable){ if(config.selectable){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment