mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Fall back to showing GraphViz source when GraphViz is not installed
This commit is contained in:
parent
8757834e07
commit
6719be02c3
6 changed files with 37 additions and 14 deletions
|
|
@ -238,13 +238,21 @@ impl Server {
|
|||
fn handle_visualize_rbx(&self) -> Response {
|
||||
let rbx_session = self.live_session.rbx_session.lock().unwrap();
|
||||
let dot_source = format!("{}", VisualizeRbxSession(&rbx_session));
|
||||
Response::svg(graphviz_to_svg(&dot_source))
|
||||
|
||||
match graphviz_to_svg(&dot_source) {
|
||||
Some(svg) => Response::svg(svg),
|
||||
None => Response::text(dot_source),
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_visualize_imfs(&self) -> Response {
|
||||
let imfs = self.live_session.imfs.lock().unwrap();
|
||||
let dot_source = format!("{}", VisualizeImfs(&imfs));
|
||||
Response::svg(graphviz_to_svg(&dot_source))
|
||||
|
||||
match graphviz_to_svg(&dot_source) {
|
||||
Some(svg) => Response::svg(svg),
|
||||
None => Response::text(dot_source),
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_visualize_path_metadata(&self) -> Response {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue