mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -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}`,
|
url: `${base_url}api/page/${tid}/${eid}/${i+1}`,
|
||||||
width: d.width,
|
width: d.width,
|
||||||
height: d.height,
|
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 << {
|
sizes << {
|
||||||
"width" => size.width,
|
"width" => size.width,
|
||||||
"height" => size.height,
|
"height" => size.height,
|
||||||
"margin" => Config.current.page_margin,
|
|
||||||
}
|
}
|
||||||
rescue e
|
rescue e
|
||||||
Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}"
|
Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}"
|
||||||
|
@ -664,6 +664,7 @@ struct APIRouter
|
|||||||
send_json env, {
|
send_json env, {
|
||||||
"success" => true,
|
"success" => true,
|
||||||
"dimensions" => sizes,
|
"dimensions" => sizes,
|
||||||
|
"margin" => Config.current.page_margin
|
||||||
}.to_json
|
}.to_json
|
||||||
rescue e
|
rescue e
|
||||||
send_json env, {
|
send_json env, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user