@@ -3,7 +3,7 @@ import * as graphvizlib from "../build/graphviz/graphvizlib/graphvizlib";
33import { loadWasm } from "./util" ;
44
55type Format = "svg" | "dot" | "json" | "dot_json" | "xdot_json" | "plain" | "plain-ext" ;
6- type Engine = "circo" | "dot" | "fdp" | "neato" | "osage" | "patchwork" | "twopi" ;
6+ type Engine = "circo" | "dot" | "fdp" | "sfdp" | " neato" | "osage" | "patchwork" | "twopi" ;
77
88interface Image {
99 path : string ;
@@ -69,6 +69,9 @@ export const graphviz = {
6969 fdp ( dotSource : string , outputFormat : Format = "svg" , ext ?: Ext ) : Promise < string > {
7070 return this . layout ( dotSource , outputFormat , "fdp" , ext ) ;
7171 } ,
72+ sfdp ( dotSource : string , outputFormat : Format = "svg" , ext ?: Ext ) : Promise < string > {
73+ return this . layout ( dotSource , outputFormat , "sfdp" , ext ) ;
74+ } ,
7275 neato ( dotSource : string , outputFormat : Format = "svg" , ext ?: Ext ) : Promise < string > {
7376 return this . layout ( dotSource , outputFormat , "neato" , ext ) ;
7477 } ,
@@ -112,6 +115,10 @@ export class GraphvizSync {
112115 return this . layout ( dotSource , outputFormat , "fdp" , ext ) ;
113116 }
114117
118+ sfdp ( dotSource : string , outputFormat : Format = "svg" , ext ?: Ext ) : string {
119+ return this . layout ( dotSource , outputFormat , "sfdp" , ext ) ;
120+ }
121+
115122 neato ( dotSource : string , outputFormat : Format = "svg" , ext ?: Ext ) : string {
116123 return this . layout ( dotSource , outputFormat , "neato" , ext ) ;
117124 }
0 commit comments