Skip to content

Commit

Permalink
re-ordered export menu
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Feb 5, 2024
1 parent 3850c48 commit a6b06ac
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions lib/src/view/menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,19 @@ A highlighting effect will still appear.
..on_click = ((_) => props.dispatch(actions.ExportSvg(type: actions.ExportSvgType.selected)))
..tooltip = "Export SVG figure of selected strands"
..display = 'SVG of selected strands')(),
(MenuBoolean()
..value = props.export_svg_text_separately
..display = 'export svg text separately (PPT)'
..tooltip = '''\
When selected, every symbol of the text in a DNA sequence is exported as a separate
SVG text element. This is useful if the SVG will be imported into Powerpoint, which
is less expressive than SVG and can render the text strangely.'''
..name = 'export-svg-text-separately'
..onChange = (_) {
props.dispatch(actions.ExportSvgTextSeparatelySet(!props.export_svg_text_separately));
}
..key = 'export-svg-text-separately')(),
DropdownDivider({'key': 'divider-export-svg'}),
(MenuDropdownItem()
..on_click = ((_) => app.disable_keyboard_shortcuts_while(export_dna_sequences.export_dna))
..tooltip = "Export DNA sequences of strands to a file."
Expand All @@ -1191,19 +1204,7 @@ A highlighting effect will still appear.
..tooltip = "Export design's DNA sequences as a CSV in the same way as cadnano v2.\n"
"This is useful, for example, with CanDo's atomic model generator."
..display = 'DNA sequences (cadnano v2 format)')(),
DropdownDivider({'key': 'divider-export-svg-settings'}),
(MenuBoolean()
..value = props.export_svg_text_separately
..display = 'export svg text separately'
..tooltip = '''\
When selected, every character of the text in a DNA sequence is exported separately.
This is useful to circumvent an SVG bug found in Microsoft tools such as PowerPoint.'''
..name = 'export-svg-text-separately'
..onChange = (_) {
props.dispatch(actions.ExportSvgTextSeparatelySet(!props.export_svg_text_separately));
}
..key = 'export-svg-text-separately')(),
DropdownDivider({'key': 'divider-not-full-design'}),
DropdownDivider({'key': 'divider-export-dna'}),
(MenuDropdownItem()
..on_click = ((_) => props.dispatch(actions.ExportCadnanoFile(whitespace: true)))
..tooltip = "Export design to cadnano (version 2) .json file."
Expand All @@ -1230,6 +1231,7 @@ cadnano files that have whitespace. ("Bad .json file format is detected in
'structure.json'. Or no dsDNA or strand crossovers exist.")"""
..display = 'cadnano v2 no whitespace'
..key = 'export-cadnano-no-whitespace')(),
DropdownDivider({'key': 'divider-cadnano'}),
(MenuDropdownItem()
..on_click = ((_) => props.dispatch(actions.OxdnaExport()))
..tooltip = "Export design to oxDNA .dat and .top files, which can be loaded in oxDNA or oxView."
Expand Down

0 comments on commit a6b06ac

Please sign in to comment.