diff --git a/src/egui_app.rs b/src/egui_app.rs index 2437a5c..283b8bd 100644 --- a/src/egui_app.rs +++ b/src/egui_app.rs @@ -55,7 +55,7 @@ impl Default for MathApp { integral_min_x: def_min_x, integral_max_x: def_max_x, integral_num: def_interval, - help_open: true, + help_open: false, } } } @@ -220,7 +220,8 @@ impl epi::App for MathApp { let step = (self.integral_min_x - self.integral_max_x).abs() / (self.integral_num as f64); - // Stores the final Plot + let mut area_list: Vec = Vec::new(); // Stores list of areas resulting from calculating the integral of functions + // Stores the final Plot egui::CentralPanel::default().show(ctx, |ui| { if !parse_error.is_empty() { ui.label(format!("Error: {}", parse_error)); @@ -228,7 +229,6 @@ impl epi::App for MathApp { } let available_width: usize = ui.available_width() as usize; - let mut area_list: Vec = Vec::new(); // Stores list of areas resulting from calculating the integral of functions Plot::new("plot") .set_margin_fraction(Vec2::ZERO) .view_aspect(1.0) @@ -263,15 +263,18 @@ impl epi::App for MathApp { i += 1; } }); - - let duration = start.elapsed(); - - // Displays all areas of functions along with how long it took to complete the entire frame - ui.label(format!( - "Area: {:?} Took: {:?}", - area_list.clone(), - duration - )); }); + + let duration = start.elapsed(); + egui::Window::new("Info") + .default_pos([200.0, 200.0]) + .show(ctx, |ui| { + // Displays all areas of functions along with how long it took to complete the entire frame + ui.label(format!( + "Area: {:?} Took: {:?}", + area_list.clone(), + duration + )); + }); } } diff --git a/www/style.css b/www/style.css index ec19321..a6f6b16 100644 --- a/www/style.css +++ b/www/style.css @@ -48,34 +48,4 @@ canvas { font-size: 24px; font-family: Ubuntu-Light, Helvetica, sans-serif; text-align: center; -} - -/* ---------------------------------------------- */ -/* Loading animation from https://loading.io/css/ */ -.lds-dual-ring { - display: inline-block; - width: 24px; - height: 24px; -} - -.lds-dual-ring:after { - content: " "; - display: block; - width: 24px; - height: 24px; - margin: 0px; - border-radius: 50%; - border: 3px solid #fff; - border-color: #fff transparent #fff transparent; - animation: lds-dual-ring 1.2s linear infinite; -} - -@keyframes lds-dual-ring { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -} +} \ No newline at end of file