Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Sep 13, 2024
1 parent d9f5847 commit 602ece7
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 25 deletions.
1 change: 0 additions & 1 deletion lib/src/view/design_main_strand_creating.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class DesignMainStrandCreatingComponent extends UiComponent2<DesignMainStrandCre
..y1 = '${start_svg.y}'
..x2 = '${end_svg.x}'
..y2 = '${end_svg.y}'
..key = 'line'
..className = constants.css_selector_domain)(),
(End5Prime()
..classname = classname_5p
Expand Down
1 change: 0 additions & 1 deletion lib/src/view/design_main_strand_dna_end_moving.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class EndMovingComponent extends UiComponent2<EndMovingProps> {
if (!props.render) {
return null;
}
DNAEnd dna_end = props.dna_end!;
Helix helix = props.helix!;
int current_offset = props.current_offset!;
bool forward = props.forward!;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/view/design_main_strand_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class DesignMainExtensionComponent extends UiComponent2<DesignMainExtensionProps
'change extension number of bases',
current_num_bases: props.ext.num_bases,
lower_bound: 1));
if (new_num_bases == null || new_num_bases == props.ext.num_bases) {
if (new_num_bases == props.ext.num_bases) {
return;
}
var selected_extensions = app.state.ui_state.selectables_store.selected_extensions;
Expand Down
22 changes: 11 additions & 11 deletions lib/src/view/design_main_strand_insertion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,18 @@ class DesignMainStrandInsertionComponent extends UiComponent2<DesignMainStrandIn

return (Dom.g()..key = key)(
(Dom.rect()
..x = background_x
..y = background_y
..width = background_width
..height = background_height
..className = 'insertion-background'
// ..onClick = ((_) => change_insertion_length())
..key = 'rect')(),
..x = background_x
..y = background_y
..width = background_width
..height = background_height
..className = 'insertion-background'
// ..onClick = ((_) => change_insertion_length())
)(),
(Dom.text()
// ..onClick = ((_) => change_insertion_length())
..dy = dy_text
// ..id = props.selectable_insertion.id()
..key = 'text')(text_path_props('${length}')));
// ..onClick = ((_) => change_insertion_length())
..dy = dy_text
// ..id = props.selectable_insertion.id()
)(text_path_props('${length}')));
}

ReactElement _insertion_background(Point<double> pos) {
Expand Down
1 change: 0 additions & 1 deletion lib/src/view/design_main_strands_moving.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ DesignMainStrandsMovingProps set_design_main_strands_moving_props(
..side_selected_helix_idxs = state.ui_state.side_selected_helix_idxs
..helix_idx_to_svg_position_map = state.helix_idx_to_svg_position_map
..geometry = state.design.geometry;
;
}

UiFactory<DesignMainStrandsMovingProps> ConnectedDesignMainStrandsMoving =
Expand Down
6 changes: 3 additions & 3 deletions lib/src/view/design_side_helix.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import 'helix_context_menu.dart';
part 'design_side_helix.over_react.g.dart';

const String SIDE_VIEW_PREFIX = 'side-view';
const SHOW_HELIX_COORDINATES_INSTEAD_OF_IDX = false;

UiFactory<DesignSideHelixProps> DesignSideHelix = _$DesignSideHelix;

Expand Down Expand Up @@ -51,7 +52,6 @@ class DesignSideHelixComponent extends UiComponent2<DesignSideHelixProps> with P
// set SHOW_HELIX_COORDINATES_INSTEAD_OF_IDX to true to print helix coordinates in side view instead
// of idx, which is useful for making figures in the documentation showing how the grids work
// bool SHOW_HELIX_COORDINATES_INSTEAD_OF_IDX = true;
bool SHOW_HELIX_COORDINATES_INSTEAD_OF_IDX = false;
int precision = constants.NUM_DIGITS_PRECISION_POSITION_DISPLAYED;

String grid_position_str;
Expand Down Expand Up @@ -86,15 +86,15 @@ backbone angles at current slice bar offset = ${props.slice_bar_offset}:
..r = '${props.helix.geometry.helix_radius_svg}'
..onClick = ((e) => this._handle_click(e, props.helix))
..id = helix_circle_id()
..key = 'circle')((Dom.svgTitle()..key = 'circle-tooltip')(tooltip)),
..key = 'circle')((Dom.svgTitle())(tooltip)),
(Dom.text()
..style = SHOW_HELIX_COORDINATES_INSTEAD_OF_IDX ? {'fontSize': 20} : {}
..className = '$SIDE_VIEW_PREFIX-helix-text'
..id = helix_text_id()
..onClick = ((e) => this._handle_click(e, props.helix))
..key = 'text-idx')(
SHOW_HELIX_COORDINATES_INSTEAD_OF_IDX ? grid_position_str : props.helix.idx.toString(),
(Dom.svgTitle()..key = 'text-idx-tooltip')(tooltip)),
(Dom.svgTitle())(tooltip)),
if (props.show_grid_coordinates)
(Dom.text()
..fontSize = 10
Expand Down
1 change: 0 additions & 1 deletion lib/src/view/potential_crossover_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ PotentialCrossoverViewProps set_potential_crossover_props(
return elt
..potential_crossover = potential_crossover
..id_ = 'potential-crossover-main';
;
}

UiFactory<PotentialCrossoverViewProps> ConnectedPotentialCrossoverView =
Expand Down
4 changes: 1 addition & 3 deletions lib/src/view/strand_color_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ class StrandOrSubstrandColorPickerComponent
'color': state.color ?? props.color,
'onChangeComplete': handleOnChangeComplete,
}),
(Dom.span()
..className = 'dialog-buttons'
..key = 'buttons')(
(Dom.span()..className = 'dialog-buttons')(
(Dom.input()
..type = 'submit'
..value = 'OK'
Expand Down
3 changes: 0 additions & 3 deletions lib/src/view/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ class View {

set_design_oxview_pane_widths() {
String design_width = local_storage.design_width();
if (design_width == null) {
design_width = '${constants.default_design_width_percent}%';
}
num oxview_width_int = 100.0 - num.parse(design_width.substring(0, design_width.length - 1));
String oxview_width = '${oxview_width_int.toString()}%';
design_and_modes_buttons_container_element.setAttribute('style', 'width: $design_width');
Expand Down

0 comments on commit 602ece7

Please sign in to comment.