(&self)
| 44 | } |
| 45 | |
| 46 | fn view(&self) -> Element<'_, Message> { |
| 47 | row![ |
| 48 | plot_panel("Shader Plot:", self.plot_a.view().map(Message::PlotA)), |
| 49 | plot_panel("Canvas Plot:", self.plot_b.view().map(Message::PlotB)), |
| 50 | ] |
| 51 | .spacing(12) |
| 52 | .padding(12) |
| 53 | .width(Length::Fill) |
| 54 | .height(Length::Fill) |
| 55 | .into() |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | fn plot_panel<'a>(title: &'static str, plot: Element<'a, Message>) -> Element<'a, Message> { |