Skip to content

Commit

Permalink
added css class for darker stroke on crossovers within the same helix
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Oct 14, 2023
1 parent a071097 commit 58cd26e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ const css_selector_domain = 'domain-line';
const css_selector_base_pair_line = 'base-pair-line';
const css_selector_extension = 'extension-line';
const css_selector_crossover = 'crossover-curve';
const css_selector_crossover_same_helix = 'crossover-curve-same-helix';
const css_selector_loopout = 'loopout-curve';
const css_selector_end_5p_strand = 'five-prime-end-first-substrand';
const css_selector_end_3p_strand = 'three-prime-end-last-substrand';
Expand Down
7 changes: 7 additions & 0 deletions lib/src/view/design_main_strand_crossover.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ class DesignMainStrandCrossoverComponent
classname += ' ' + constants.css_selector_scaffold;
}

// Want to display crossovers within a helix a little darker since it's hard to see them;
// This is for "crossovers" that really are just buffered space between domains on the same helix.
if (props.prev_domain.helix == props.next_domain.helix &&
props.prev_domain.forward == props.next_domain.forward) {
classname += ' ' + constants.css_selector_crossover_same_helix;
}

var prev_group = props.helices[props.prev_domain.helix].group;
var next_group = props.helices[props.next_domain.helix].group;
bool within_group = prev_group == next_group;
Expand Down
4 changes: 4 additions & 0 deletions web/scadnano-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,10 @@ label + select {
fill: none;
}

.crossover-curve-same-helix {
stroke-opacity: 0.55;
}

.potential-vertical-crossover-curve {
stroke-width: 4;
fill: none;
Expand Down

0 comments on commit 58cd26e

Please sign in to comment.