Skip to content
Snippets Groups Projects
Commit 7c433d59 authored by marcantoinem's avatar marcantoinem
Browse files

(bug) fix personal grid phantom selection

parent e502eaaa
No related branches found
No related tags found
No related merge requests found
......@@ -40,9 +40,9 @@ where
for day in initial_x..=destination_x {
week[day].update(|v| {
if is_positive {
*v |= 2u64.pow(destination_y as u32 + 1) - 2u64.pow(initial_y as u32);
*v |= 2u64.pow(destination_y as u32 + 2) - 2u64.pow(initial_y as u32);
} else {
*v &= !(2u64.pow(destination_y as u32 + 1) - 2u64.pow(initial_y as u32));
*v &= !(2u64.pow(destination_y as u32 + 2) - 2u64.pow(initial_y as u32));
}
});
}
......@@ -80,14 +80,14 @@ where
};
view! {
<div style=style class=class
on:pointerdown=move |e| {
set_initial.set(Some((i, j)));
set_positive.set((week[i].get() & (1 << j)) == 0);
let _ = e.target().unwrap().dyn_ref::<Element>().unwrap().release_pointer_capture(e.pointer_id());
}
on:pointerover=move |_| {
set_destination.set((i, j));
}>
on:pointerdown=move |e| {
set_initial.set(Some((i, j)));
set_positive.set((week[i].get() & (1 << j)) == 0);
let _ = e.target().unwrap().dyn_ref::<Element>().unwrap().release_pointer_capture(e.pointer_id());
}
on:pointerover=move |_| {
set_destination.set((i, j));
}>
</div>
}
}).collect_view()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment