Skip to content

Commit

Permalink
Proper handling of the "viewer" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Sep 19, 2023
1 parent 3c88cac commit 0981cd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vsvg-sketch/src/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pub use crate::{sketch::Sketch, Result};
pub use vsvg::{Draw, IntoBezPath, IntoBezPathTolerance, PageSize, Transforms, Units};

#[cfg(feature = "viewer")]
pub use vsvg_viewer::show;
1 change: 1 addition & 0 deletions vsvg-sketch/src/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ impl Sketch {
&self.document
}

#[cfg(feature = "viewer")]
pub fn show(&mut self) -> anyhow::Result<&mut Self> {
vsvg_viewer::show(self.document())?;
Ok(self)
Expand Down

0 comments on commit 0981cd8

Please sign in to comment.