fix: dbl click dest called wrong screenshot function
Gitea Scan/plate-tool/pipeline/head This commit looks good Details

This commit is contained in:
Emilia Allison 2024-12-16 22:04:06 -05:00
parent 754000952b
commit 0e0d72ec9c
Signed by: emilia
GPG Key ID: 05D5D1107E5100A1
1 changed files with 12 additions and 3 deletions

View File

@ -121,9 +121,18 @@ pub fn Plate(props: &PlateProps) -> Html {
let mouseleave_callback = Callback::clone(&mouseup_callback);
let screenshot_callback = Callback::from(|_| {
let screenshot_callback = {
match props.ptype {
PlateType::Source =>
Callback::from(|_| {
let _ = js_sys::eval("copy_screenshot_src()");
});
}),
PlateType::Destination =>
Callback::from(|_| {
let _ = js_sys::eval("copy_screenshot_dest()");
}),
}
};
let width = match props.ptype {
PlateType::Source => props.source_plate.plate.size().1,