jamesscottbrown / pyyed

A simple Python library to export networks to yEd
BSD 3-Clause "New" or "Revised" License
81 stars 37 forks source link

fix for target_label of Edge.addlabel #51

Open dmismirn opened 2 years ago

dmismirn commented 2 years ago

Hello, team!

first of all thanks for the great module. In the process of using it, I noticed a small optimization for the code:

        if target_label is not None:
            self.add_label(source_label, model_name="six_pos", model_position="shead", preferred_placement="source_on_edge",
            border_color=label_border_color, background_color = label_background_color)

i would suggest the following changes (target_label and thead):

        if target_label is not None:
            self.add_label(target_label, model_name="six_pos", model_position="thead", preferred_placement="source_on_edge",
            border_color=label_border_color, background_color = label_background_color)

Thanks!

hazbut commented 2 years ago

slight correction to this proposal:

self.add_label(target_label, model_name="six_pos", model_position="ttail", preferred_placement="target_on_edge",