Open hajicj opened 6 years ago
Steps towards solution 1:
label
param on model.ensure_add_edge()
will be non-default (label='Precedence'
)EdgeView
has to set its color (resp. other visual properties) according to the edge label. This should be handled in EdgeView._generate_edge_view_color()
, which needs to get a label
param.CropObject.data
entries.Decision: so far, we will stick with solution 1. It requires the least modification and (almost) by definition, attachment edges and precedence edges will never lead between the same pair of symbols: it is actually right now forbidden to have Attachment among noteheads/rests.
It should be possible to annotate and visualize not only the symbol attachment graph, but also the precedence graph of notes and rests (however it is defined).
This essentially means having edges of different types in the object graph. There are two ways to implement this in the data model:
Hold in one graph and have different edge labels: use edge labels to decide how to render edge; when synchronizing graph to CropObjects, use edge labels to decide how to modify the CropObject (inlinks/outlinks vs. data)
Hold in separate graphs.
Keeping all the edges in one graph has the disadvantage that it will be difficult to have two edges with different labels between a pair of objects. We can record label lists, but that breaks the 1:1 relationship between edge in graph and EdgeView.