commit/galaxy-central: greg: Add more flexibility in generating a workflow image in the tool shed.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/0ebee7a77805/ changeset: 0ebee7a77805 user: greg date: 2012-01-19 20:58:48 summary: Add more flexibility in generating a workflow image in the tool shed. affected #: 1 file diff -r 5ecec0d061792687699a04543cfe80b7125f54b4 -r 0ebee7a7780521926745c430c94aac081efc6332 lib/galaxy/webapps/community/controllers/workflow.py --- a/lib/galaxy/webapps/community/controllers/workflow.py +++ b/lib/galaxy/webapps/community/controllers/workflow.py @@ -250,7 +250,22 @@ boxes.append( svgfig.Rect( x - margin, y + 30, x + width - margin, y + 30 + box_height, fill="#ffffff" ).SVG() ) for conn, output_dict in step_dict[ 'input_connections' ].iteritems(): in_coords = in_pos[ step_dict[ 'id' ] ][ conn ] - out_conn_pos = out_pos[ output_dict[ 'id' ] ][ output_dict[ 'output_name' ] ] + # out_pos_index will be a step number like 1, 2, 3... + out_pos_index = output_dict[ 'id' ] + # out_pos_name will be a string like 'o', 'o2', etc. + out_pos_name = output_dict[ 'output_name' ] + if out_pos_index in out_pos: + # out_conn_index_dict will be something like: + # 7: {'o': (824.5, 618)} + out_conn_index_dict = out_pos[ out_pos_index ] + if out_pos_name in out_conn_index_dict: + out_conn_pos = out_pos[ out_pos_index ][ out_pos_name ] + else: + # Take any key / value pair available in out_conn_index_dict. + # A problem will result if the dictionary is empty. + if out_conn_index_dict.keys(): + key = out_conn_index_dict.keys()[0] + out_conn_pos = out_pos[ out_pos_index ][ key ] adjusted = ( out_conn_pos[ 0 ] + widths[ output_dict[ 'id' ] ], out_conn_pos[ 1 ] ) text.append( svgfig.SVG( "circle", cx=out_conn_pos[ 0 ] + widths[ output_dict[ 'id' ] ] - margin, Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket