mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
Moved margin value to the dimensions API
This commit is contained in:
parent
0f39535097
commit
aa70752244
@ -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;`
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -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}"
|
||||
|
@ -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, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user