UC-Davis-molecular-computing / scadnano

Web application for designing DNA structures such as DNA origami.
https://scadnano.org
MIT License
21 stars 13 forks source link

895 export base pair lines #955

Closed rayzhuca closed 6 months ago

rayzhuca commented 7 months ago

Added export SVG support for base pair lines.

Changes

rayzhuca commented 7 months ago

It should work now. It was a quick fix. In export_svg_middleware, there is an if statement. One branch is for ExportSvg and another is CopySelectedStandsToClipboardImage. I just had to call get_selected_base_pairs in both branches.

rayzhuca commented 7 months ago

The new commit renamed get_selected_strands and get_selected_base_pairs to get_svg_elements_of_strands and get_svg_elements_of_base_pairs as well as changes to function arguments. I also removed the long one-line and refactored two pieces of repeated of code into one function called get_selected_svg_elements.