Render route-D preview pages at page size
This commit is contained in:
1 parent
875f8a7600
commit
fab9a473fc
1 file changed
+4
-1
+4
-1
@@ -51,7 +51,10 @@ pub fn preview_json(source: &str) -> Result<String, String> {
|
|||||||
json.push_str("{\"status\":\"ok\",\"pageWidthMm\":215.90,\"pageHeightMm\":279.40,\"pages\":[");
|
json.push_str("{\"status\":\"ok\",\"pageWidthMm\":215.90,\"pageHeightMm\":279.40,\"pages\":[");
|
||||||
let mut page_count = 0usize;
|
let mut page_count = 0usize;
|
||||||
for page in engine.pages() {
|
for page in engine.pages() {
|
||||||
let svg = page.display_list().to_svg();
|
let mut list = page.display_list();
|
||||||
|
list.width = list.width.max(612 * SCALE);
|
||||||
|
list.height = list.height.max(PAGE_HEIGHT_PT * SCALE);
|
||||||
|
let svg = list.to_svg();
|
||||||
if page_count > 0 {
|
if page_count > 0 {
|
||||||
json.push(',');
|
json.push(',');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user