lib/y_petri/net/visualization.rb in y_petri-2.3.3 vs lib/y_petri/net/visualization.rb in y_petri-2.3.4
- old
+ new
@@ -16,15 +16,15 @@
style: 'filled'
end
transition_nodes = transitions.map.with_object Hash.new do |tr, ꜧ|
ꜧ[tr] = γ.add_nodes tr.name.to_s,
shape: 'box',
- fillcolor: if tr.assignment? then 'yellow'
- elsif tr.type == :TS then 'lightcyan'
- else 'ghostwhite' end,
- color: if tr.assignment? then 'goldenrod'
- elsif tr.type == :TS then 'cyan'
- else 'grey' end,
+ fillcolor: ( if tr.assignment? then 'yellow'
+ elsif tr.type == :TS then 'lightcyan'
+ else 'ghostwhite' end ),
+ color: ( if tr.assignment? then 'goldenrod'
+ elsif tr.type == :TS then 'cyan'
+ else 'grey' end ),
style: 'filled'
end
# Add Petri net arcs.
transition_nodes.each { |tr, tr_node|
if tr.assignment? then