MCPcopy Create free account
hub / github.com/angular-rust/ux-components / on_resize_down

Method on_resize_down

src/elements/window.rs:213–235  ·  view source on GitHub ↗
(&mut self, e: &mut MouseEvent, _: f32)

Source from the content-addressed store, hash-verified

211 }
212
213 fn on_resize_down(&mut self, e: &mut MouseEvent, _: f32) {
214 if !self.resizable {
215 return;
216 }
217
218 if self.collapsed {
219 return;
220 }
221
222 let mut state = self.state.borrow_mut();
223 if state.resizing {
224 return;
225 }
226
227 state.resizing = true;
228 state.resize_x = e.x as f32;
229 state.resize_y = e.y as f32;
230
231 if let Some(handle) = self.resize_handle.as_ref() {
232 handle.capture()
233 }
234 e.bubble = false;
235 }
236
237 fn on_collapse(&mut self, e: &mut MouseEvent, _: f32) {
238 if !self.collapsible {

Callers

nothing calls this directly

Calls 2

captureMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected