Moved margin value to the dimensions API

This commit is contained in:
Simon 2021-01-06 17:30:55 +01:00
parent 0f39535097
commit aa70752244
3 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ const readerComponent = () => {
url: `${base_url}api/page/${tid}/${eid}/${i+1}`,
width: d.width,
height: d.height,
style: `margin-top: ${d.margin}px; margin-bottom: ${d.margin}px;`
style: `margin-top: ${data.margin}px; margin-bottom: ${data.margin}px;`
};
});

View File

@ -117,7 +117,6 @@ class Entry
sizes << {
"width" => size.width,
"height" => size.height,
"margin" => Config.current.page_margin,
}
rescue e
Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}"

View File

@ -664,6 +664,7 @@ struct APIRouter
send_json env, {
"success" => true,
"dimensions" => sizes,
"margin" => Config.current.page_margin
}.to_json
rescue e
send_json env, {