From 602ece7167bda87eec7564708db29f5fe439b43b Mon Sep 17 00:00:00 2001 From: David Doty Date: Fri, 13 Sep 2024 10:18:53 -0700 Subject: [PATCH] cleanup --- lib/src/view/design_main_strand_creating.dart | 1 - .../design_main_strand_dna_end_moving.dart | 1 - .../view/design_main_strand_extension.dart | 2 +- .../view/design_main_strand_insertion.dart | 22 +++++++++---------- lib/src/view/design_main_strands_moving.dart | 1 - lib/src/view/design_side_helix.dart | 6 ++--- lib/src/view/potential_crossover_view.dart | 1 - lib/src/view/strand_color_picker.dart | 4 +--- lib/src/view/view.dart | 3 --- 9 files changed, 16 insertions(+), 25 deletions(-) diff --git a/lib/src/view/design_main_strand_creating.dart b/lib/src/view/design_main_strand_creating.dart index f0faf85c6..4842f4607 100644 --- a/lib/src/view/design_main_strand_creating.dart +++ b/lib/src/view/design_main_strand_creating.dart @@ -49,7 +49,6 @@ class DesignMainStrandCreatingComponent extends UiComponent2 { 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!; diff --git a/lib/src/view/design_main_strand_extension.dart b/lib/src/view/design_main_strand_extension.dart index b685b4473..688514235 100644 --- a/lib/src/view/design_main_strand_extension.dart +++ b/lib/src/view/design_main_strand_extension.dart @@ -229,7 +229,7 @@ class DesignMainExtensionComponent extends UiComponent2 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 pos) { diff --git a/lib/src/view/design_main_strands_moving.dart b/lib/src/view/design_main_strands_moving.dart index c6035b8d2..c66386c38 100644 --- a/lib/src/view/design_main_strands_moving.dart +++ b/lib/src/view/design_main_strands_moving.dart @@ -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 ConnectedDesignMainStrandsMoving = diff --git a/lib/src/view/design_side_helix.dart b/lib/src/view/design_side_helix.dart index 4fb987965..d617ab729 100644 --- a/lib/src/view/design_side_helix.dart +++ b/lib/src/view/design_side_helix.dart @@ -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 DesignSideHelix = _$DesignSideHelix; @@ -51,7 +52,6 @@ class DesignSideHelixComponent extends UiComponent2 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; @@ -86,7 +86,7 @@ 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' @@ -94,7 +94,7 @@ backbone angles at current slice bar offset = ${props.slice_bar_offset}: ..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 diff --git a/lib/src/view/potential_crossover_view.dart b/lib/src/view/potential_crossover_view.dart index 9171e5536..b00d37c00 100644 --- a/lib/src/view/potential_crossover_view.dart +++ b/lib/src/view/potential_crossover_view.dart @@ -11,7 +11,6 @@ PotentialCrossoverViewProps set_potential_crossover_props( return elt ..potential_crossover = potential_crossover ..id_ = 'potential-crossover-main'; - ; } UiFactory ConnectedPotentialCrossoverView = diff --git a/lib/src/view/strand_color_picker.dart b/lib/src/view/strand_color_picker.dart index 030873046..ef875804e 100644 --- a/lib/src/view/strand_color_picker.dart +++ b/lib/src/view/strand_color_picker.dart @@ -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' diff --git a/lib/src/view/view.dart b/lib/src/view/view.dart index 126655fbe..4011fd06b 100644 --- a/lib/src/view/view.dart +++ b/lib/src/view/view.dart @@ -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');