Fixing color for edge formatter
This commit is contained in:
@ -488,7 +488,7 @@ ColorEdge: graph::EdgeColor = {
|
|||||||
|
|
||||||
|
|
||||||
GraphSaveOptions: presets::GraphSaveOptions = {
|
GraphSaveOptions: presets::GraphSaveOptions = {
|
||||||
"Dot" <s_node: SeparatorNode> "|" <s_edge: SeparatorEdge> "|"
|
"Dot" "|"? <s_node: SeparatorNode> "|" <s_edge: SeparatorEdge> "|"
|
||||||
<c_node: ColorNode> "|" <c_edge: ColorEdge> ">"
|
<c_node: ColorNode> "|" <c_edge: ColorEdge> ">"
|
||||||
<so: SaveOptions> =>
|
<so: SaveOptions> =>
|
||||||
presets::GraphSaveOptions::Dot { node_display: s_node,
|
presets::GraphSaveOptions::Dot { node_display: s_node,
|
||||||
@ -496,7 +496,7 @@ GraphSaveOptions: presets::GraphSaveOptions = {
|
|||||||
node_color: c_node,
|
node_color: c_node,
|
||||||
edge_color: c_edge,
|
edge_color: c_edge,
|
||||||
so },
|
so },
|
||||||
"GraphML" <s_node: SeparatorNode> "|" <s_edge: SeparatorEdge> ">"
|
"GraphML" "|"? <s_node: SeparatorNode> "|" <s_edge: SeparatorEdge> ">"
|
||||||
<so: SaveOptions> =>
|
<so: SaveOptions> =>
|
||||||
presets::GraphSaveOptions::GraphML { node_display: s_node,
|
presets::GraphSaveOptions::GraphML { node_display: s_node,
|
||||||
edge_display: s_edge,
|
edge_display: s_edge,
|
||||||
|
|||||||
@ -566,7 +566,7 @@ pub fn edge_formatter_base_color(
|
|||||||
base_color: String
|
base_color: String
|
||||||
) -> String
|
) -> String
|
||||||
{
|
{
|
||||||
", fillcolor=".to_string() + &base_color
|
", color=".to_string() + &base_color
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn edge_formatter(
|
pub fn edge_formatter(
|
||||||
@ -581,7 +581,7 @@ pub fn edge_formatter(
|
|||||||
move |_, e| {
|
move |_, e| {
|
||||||
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
||||||
if ot.evaluate(&rssystem.available_entities, &set) {
|
if ot.evaluate(&rssystem.available_entities, &set) {
|
||||||
Some(", fillcolor=".to_string() + &color)
|
Some(", color=".to_string() + &color)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@ -593,7 +593,7 @@ pub fn edge_formatter(
|
|||||||
move |_, e| {
|
move |_, e| {
|
||||||
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
||||||
if ot.evaluate(&rssystem.context, &set) {
|
if ot.evaluate(&rssystem.context, &set) {
|
||||||
Some(", fillcolor=".to_string() + &color)
|
Some(", color=".to_string() + &color)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@ -605,7 +605,7 @@ pub fn edge_formatter(
|
|||||||
move |_, e| {
|
move |_, e| {
|
||||||
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
||||||
if ot.evaluate(&rssystem.t, &set) {
|
if ot.evaluate(&rssystem.t, &set) {
|
||||||
Some(", fillcolor=".to_string() + &color)
|
Some(", color=".to_string() + &color)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@ -617,7 +617,7 @@ pub fn edge_formatter(
|
|||||||
move |_, e| {
|
move |_, e| {
|
||||||
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
||||||
if ot.evaluate(&rssystem.reactants, &set) {
|
if ot.evaluate(&rssystem.reactants, &set) {
|
||||||
Some(", fillcolor=".to_string() + &color)
|
Some(", color=".to_string() + &color)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@ -629,7 +629,7 @@ pub fn edge_formatter(
|
|||||||
move |_, e| {
|
move |_, e| {
|
||||||
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
||||||
if ot.evaluate(&rssystem.reactants_absent, &set) {
|
if ot.evaluate(&rssystem.reactants_absent, &set) {
|
||||||
Some(", fillcolor=".to_string() + &color)
|
Some(", color=".to_string() + &color)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@ -641,7 +641,7 @@ pub fn edge_formatter(
|
|||||||
move |_, e| {
|
move |_, e| {
|
||||||
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
||||||
if ot.evaluate(&rssystem.inhibitors, &set) {
|
if ot.evaluate(&rssystem.inhibitors, &set) {
|
||||||
Some(", fillcolor=".to_string() + &color)
|
Some(", color=".to_string() + &color)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@ -653,7 +653,7 @@ pub fn edge_formatter(
|
|||||||
move |_, e| {
|
move |_, e| {
|
||||||
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
||||||
if ot.evaluate(&rssystem.inhibitors_present, &set) {
|
if ot.evaluate(&rssystem.inhibitors_present, &set) {
|
||||||
Some(", fillcolor=".to_string() + &color)
|
Some(", color=".to_string() + &color)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@ -665,7 +665,7 @@ pub fn edge_formatter(
|
|||||||
move |_, e| {
|
move |_, e| {
|
||||||
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
let rssystem = original_graph.edge_weight(e.id()).unwrap();
|
||||||
if ot.evaluate(&rssystem.products, &set) {
|
if ot.evaluate(&rssystem.products, &set) {
|
||||||
Some(", fillcolor=".to_string() + &color)
|
Some(", color=".to_string() + &color)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,4 +4,10 @@ Context: [({a,b}.{a}.{a,c}.x + {a,b}.{a}.{a}.nill)]
|
|||||||
Reactions: ([{a,b}, {c}, {b}])
|
Reactions: ([{a,b}, {c}, {b}])
|
||||||
|
|
||||||
|
|
||||||
Digraph > Dot Context | Hide | Context.EntitySet ⊆ {a, c} ? "HERE" || Context.NonDeterministicChoice ? "ASDASDSAD" ! "#123" | ! "#987" > Print
|
Digraph
|
||||||
|
> Dot
|
||||||
|
| Context
|
||||||
|
| Hide
|
||||||
|
| Context.EntitySet ⊆ {a, c} ? "lightblue" || Context.NonDeterministicChoice ? "yellow" ! "#123"
|
||||||
|
| Entities < {a} ? "white" ! "#lightgreen"
|
||||||
|
> Print
|
||||||
|
|||||||
Reference in New Issue
Block a user