diff --git a/plate-tool-web/src/components/plates/plate.rs b/plate-tool-web/src/components/plates/plate.rs index cc72a87..d6b52b8 100644 --- a/plate-tool-web/src/components/plates/plate.rs +++ b/plate-tool-web/src/components/plates/plate.rs @@ -121,9 +121,18 @@ pub fn Plate(props: &PlateProps) -> Html { let mouseleave_callback = Callback::clone(&mouseup_callback); - let screenshot_callback = Callback::from(|_| { - let _ = js_sys::eval("copy_screenshot_src()"); - }); + 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,