(&self, e: &mut MouseEvent)
| 323 | } |
| 324 | |
| 325 | fn mousewheel(&self, e: &mut MouseEvent) { |
| 326 | let state = self.state.borrow(); |
| 327 | // self.base.mousewheel(e); |
| 328 | |
| 329 | if e.x != 0 && state.visible_h { |
| 330 | let dir = Helper::sign(e.x as f32) as f32; |
| 331 | self.set_scroll_percent( |
| 332 | Some(state.percent_h + (dir * self.step_h())), |
| 333 | Some(state.percent_v), |
| 334 | ); |
| 335 | } |
| 336 | |
| 337 | if e.y != 0 && state.visible_v { |
| 338 | let dir = Helper::sign(e.y as f32) as f32; |
| 339 | self.set_scroll_percent( |
| 340 | Some(state.percent_h), |
| 341 | Some(state.percent_v + (dir * self.step_v())), |
| 342 | ); |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | // _dx: f32 =0.0, _dy: f32 =0.0, _dw: f32 =0.0, _dh: f32 =0.0 |
| 347 | fn bounds_changed(&self, dx: f32, dy: f32, dw: f32, dh: f32) { |
nothing calls this directly
no test coverage detected