Skip to content

Commit bf1ccb4

Browse files
committed
moved clear button
1 parent 5e79041 commit bf1ccb4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/sauce/home.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,6 @@ pub fn plot_component(props: &PlotProps) -> Html {
116116
<div style="text-align: center;">
117117
<div class="d-flex mb-2">
118118

119-
<button
120-
onclick={props.clear_plot_callback.clone()} // <-- Add this button
121-
class="btn btn-primary me-2"
122-
>
123-
{ "Clear Plot" }
124-
</button>
125-
126119
</div>
127120
<div id="plot-div"></div>
128121
</div>
@@ -482,6 +475,14 @@ pub fn home() -> Html {
482475
</div>
483476
</div>
484477

478+
479+
<button
480+
onclick={clear_plot_callback.clone()}
481+
class="btn btn-primary me-2"
482+
>
483+
{ "Clear Plot" }
484+
</button>
485+
485486
<button
486487
onclick={onclick_toggle_x_log}
487488
class="btn btn-primary me-2"
@@ -524,7 +525,7 @@ pub fn home() -> Html {
524525
selected_indexes={(*selected_indexes.current()).clone()}
525526
is_y_log={is_y_log.clone()}
526527
is_x_log={is_x_log.clone()}
527-
clear_plot_callback={clear_plot_callback}
528+
clear_plot_callback={clear_plot_callback.clone()}
528529
/>
529530
</div>
530531
// <h5>{"Created by Jon Shimwell, source code available "}</h5>

0 commit comments

Comments
 (0)