Skip to content

Commit

Permalink
Simplify ipyvue component registration
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley committed Dec 20, 2024
1 parent fd41910 commit 58913e7
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions large_image/widgets/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,10 @@
colors_file = parent / 'colors.json'
with open(colors_file) as f:
colors_data = json.load(f)
dual_input_template_file = parent / 'DualInput.vue'
with open(dual_input_template_file) as f:
dual_input_template = f.read()
composite_layers_template_file = parent / 'CompositeLayers.vue'
with open(composite_layers_template_file) as f:
composite_layers_template = f.read()
histogram_editor_template_file = parent / 'HistogramEditor.vue'
with open(histogram_editor_template_file) as f:
histogram_editor_template = f.read()

ipyvue.register_component_from_file(None, 'dual-input', dual_input_template_file)
ipyvue.register_component_from_file(None, 'composite-layers', composite_layers_template_file)
ipyvue.register_component_from_file(None, 'histogram-editor', histogram_editor_template_file)

ipyvue.register_component_from_file(None, 'dual-input', parent / 'DualInput.vue')
ipyvue.register_component_from_file(None, 'composite-layers', parent / 'CompositeLayers.vue')
ipyvue.register_component_from_file(None, 'histogram-editor', parent / 'HistogramEditor.vue')


class FrameSelector(ipyvue.VueTemplate): # type: ignore
Expand Down

0 comments on commit 58913e7

Please sign in to comment.