mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 01:37:02 -06:00
Export for Screens: a per-artboard EPS takes the artboard as its page, so an empty artboard still writes
This commit is contained in:
@@ -793,7 +793,12 @@ fn encode_and_write(export: ScreenExport, writer: &mut dyn FnMut(&str, &[u8]) ->
|
||||
Arc::new(d)
|
||||
})
|
||||
.clone();
|
||||
write(&d, r.format.id, &r.options_for(item.region, None)?)?
|
||||
let mut options = r.options_for(item.region, None)?;
|
||||
// An EPS page is the artboard, not its art's bounds: an artboard without art still writes.
|
||||
if r.format.id == "eps" {
|
||||
options["useArtboards"] = json!(true);
|
||||
}
|
||||
write(&d, r.format.id, &options)?
|
||||
} else {
|
||||
write(&item.doc, r.format.id, &r.options_for(item.region, item.artboard)?)?
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user