-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed copy image not displaying base lines
- Loading branch information
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A couple of pedantic requests based on the aesthetics that will help me to understand this code better down the road:
addAll
). Things like this are easier to debug when separated into a few commands.get_selected_base_pairs
andget_selected_strands
each take aStore
as input. This might just be pure aesthetics, but somehow it seems more natural to me to pass in a more specific object (e.g., forget_selected_strands
, all you access in it isstore.state.ui_state.selectables_store.selected_strands
, so it makes more sense to me to pass that in as the argument). Also the name seems a bit inaccurate. You already have the selectedStrand
objects instore.state.ui_state.selectables_store.selected_strands
, so that's not really what the function is returning. It's actually returning the HTML nodes that represent the selectedStrand
objects. A better name for the function would be something likeget_svg_elements_of_strands
. Note we also remove "selected" from the name, because there's nothing about the function that requires the strands be selected. It could be all strands, or the one that was just clicked, or something, and we could reuse this function later in those other contexts where we want to get the HTML nodes corresponding to some set ofStrand
's whether or not that set happens to be theStrand
's that are currently selected. Similar ideas probably apply toget_selected_base_pairs
although I don't have time right now to look at it in more detail.