Resizes just only change size state for chart and do not resize the container/canvas.
(&self, w: f64, h: f64)
| 704 | |
| 705 | /// Resizes just only change size state for chart and do not resize the container/canvas. |
| 706 | fn resize(&self, w: f64, h: f64) { |
| 707 | // println!("BaseChart resize {} {}", w, h); |
| 708 | if w == 0_f64 || h == 0_f64 { |
| 709 | println!("BaseChart resize OOOPS"); |
| 710 | return; |
| 711 | } |
| 712 | |
| 713 | let mut props = self.props.borrow_mut(); |
| 714 | if w != props.width || h != props.height { |
| 715 | props.width = w; |
| 716 | props.height = h; |
| 717 | // force_redraw = true; // now_eq |
| 718 | } |
| 719 | |
| 720 | props.area = Rect { |
| 721 | origin: Point::new(CHART_PADDING, CHART_PADDING), |
| 722 | size: Size::new( |
| 723 | props.width - 2.0 * CHART_PADDING, |
| 724 | props.height - 2.0 * CHART_PADDING, |
| 725 | ), |
| 726 | }; |
| 727 | } |
| 728 | |
| 729 | /// Draws the axes and the grid. |
| 730 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected