Fix drag issue
These few lines of code are going to plague this project. Transiently, this solution doesn't seem fast enough and will "forget" that the mouse button is being held during a drag. I'm using mouseenter instead of mouseover because it should trigger less often---this ought to be more efficient(?).
This commit is contained in:
parent
e0563d7b9b
commit
67738543cc
|
@ -68,7 +68,10 @@ fn SourcePlateCell(cx: Scope<PlateCellProps>, i: u8, j: u8, color: Option<String
|
|||
selection_state.write().m_end = None;
|
||||
selection_state.write().m_stat = true;
|
||||
},
|
||||
onmouseover: move |_| {
|
||||
onmouseenter: move |me: MouseEvent| {
|
||||
if me.data.held_buttons().is_empty() {
|
||||
selection_state.write().m_stat = false;
|
||||
}
|
||||
if selection_state.read().m_stat {
|
||||
selection_state.write().m_end = Some((*i,*j))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue