@@ -96,35 +96,34 @@ export function StockFlowGraphviz(props: {
9696
9797 const vizLayout = ( ) => {
9898 const viz = vizResource ( ) ;
99- const patternAuxiliaryVariable : Pattern < ModelJudgment > = {
99+ const patternAuxiliaryVariable : P . Pattern < ModelJudgment > = {
100100 tag : "object" ,
101101 obType : {
102- content : "DynamicVariable " ,
102+ content : "AuxiliaryVariable " ,
103103 tag : "Basic" ,
104104 }
105105 } ;
106- const patternVariableLink : Pattern < ModelJudgment > = {
107- tag : "morphism" ,
108- morType : {
109- content : "VariableLink" ,
110- tag : "Basic" ,
111- }
112- } ;
106+ // const patternVariableLink: P. Pattern<ModelJudgment> = {
107+ // tag: "morphism",
108+ // morType: {
109+ // content: "VariableLink",
110+ // tag: "Basic",
111+ // }
112+ // };
113113 return (
114114 viz &&
115115 vizLayoutGraph (
116116 viz ,
117117 modelToGraphviz ( props . model , props . theory , props . attributes ,
118- ( jgmt : ModelJudgment ) => {
118+ ( jgmt : ModelJudgment ) =>
119119 match ( jgmt )
120120 . with ( patternAuxiliaryVariable , ( ) => ( { xlabel : jgmt . name , label : "" } ) )
121121 . with ( P . _ , ( ) => undefined )
122- } ,
123- ( jgmt : ModelJudgment ) =>
124- match ( jgmt )
125- . with ( patternVariableLink , ( ) => ( { style : "variable-link" } ) )
126- . with ( P . _ , ( ) => undefined )
127-
122+ . run ( )
123+ // (jgmt: ModelJudgment) =>
124+ // match(jgmt)
125+ // .with(patternVariableLink, () => ({ style: "variable-link" }))
126+ // .with(P._, () => undefined)
128127 ) ,
129128 props . options ,
130129 )
@@ -146,8 +145,24 @@ function StockFlowSVG(props: {
146145 const result : string [ ] = [ ] ;
147146 const nodeMap = uniqueIndexArray ( props . layout ?. nodes ?? [ ] , ( node ) => node . id ) ;
148147 const edgeMap = uniqueIndexArray ( props . layout ?. edges ?? [ ] , ( edge ) => edge . id ) ;
149- console . log ( nodeMap , edgeMap ) ;
150- const patternFlowLink : Pattern < ModelJudgment > = {
148+ // const patternFlowLink: P.Pattern<ModelJudgment> = {
149+ // tag: "morphism",
150+ // dom: {
151+ // tag: "Basic",
152+ // content: P.select("srcId"),
153+ // },
154+ // cod: {
155+ // tag: "Tabulated",
156+ // content: {
157+ // tag: "Basic",
158+ // content: P.select("tgtId"),
159+ // },
160+ // },
161+ // };
162+ for ( const judgment of props . model ) {
163+ match ( judgment )
164+ . with (
165+ {
151166 tag : "morphism" ,
152167 dom : {
153168 tag : "Basic" ,
@@ -160,10 +175,7 @@ function StockFlowSVG(props: {
160175 content : P . select ( "tgtId" ) ,
161176 } ,
162177 } ,
163- } ;
164- for ( const judgment of props . model ) {
165- match ( judgment )
166- . with ( patternFlowLink ,
178+ } ,
167179 ( { srcId, tgtId } ) => {
168180 const srcNode = nodeMap . get ( srcId ) ;
169181 const tgtEdge = edgeMap . get ( tgtId ) ;
0 commit comments