diff --git a/src/image_plotter.rs b/src/image_plotter.rs index c2cf7bd..da34313 100644 --- a/src/image_plotter.rs +++ b/src/image_plotter.rs @@ -32,9 +32,9 @@ impl ImagePlotter { s } - pub fn show_only(self) -> Self { + pub fn show_only(self, only: bool) -> Self { let mut s = self; - s.show_only = true; + s.show_only = only; s } @@ -121,7 +121,13 @@ impl ImagePlotter { .boxed_zoom_pointer_button(PointerButton::Extra2) .show_grid([self.show_grid, self.show_grid]) .clamp_grid(true) - .sharp_grid_lines(false); + .sharp_grid_lines(false) + .show_axes([!self.show_only, !self.show_only]) + .allow_scroll(!self.show_only) + .allow_zoom(!self.show_only) + .allow_drag(!self.show_only) + .show_x(!self.show_only) + .show_y(!self.show_only); plot.show(ui, |plot_ui| { plot_ui.image(PlotImage::new( diff --git a/src/image_shower.rs b/src/image_shower.rs index 505a14d..201ae62 100644 --- a/src/image_shower.rs +++ b/src/image_shower.rs @@ -1,8 +1,6 @@ use crate::image_plotter::ImagePlotter; use eframe::egui; -use eframe::egui::load::SizedTexture; -use eframe::egui::{Color32, ColorImage, PointerButton}; -use egui_plot::{CoordinatesFormatter, Corner, PlotImage, PlotPoint}; +use eframe::egui::Color32; use icu_lib::midata::MiData; use serde::{Deserialize, Serialize};