plate-tool/plate-tool-web/src/components/plates/plate_data.rs

25 lines
594 B
Rust

use yew::prelude::*;
use plate_tool_lib::plate_instances::PlateInstance;
use plate_tool_lib::plate::PlateType;
#[derive(PartialEq, Properties)]
pub struct PlateProps {
pub source_plate: PlateInstance,
pub destination_plate: PlateInstance,
pub cell_height: f64,
pub ptype: PlateType,
pub send_coordinates: Option<Callback<(u8,u8)>>,
}
pub type MStartHandle = UseStateHandle<Option<(u8, u8)>>;
pub type MEndHandle = UseStateHandle<Option<(u8, u8)>>;
pub type MStatHandle = UseStateHandle<bool>;
#[derive(Debug)]
pub enum MouseEventType {
Mousedown,
Mouseenter,
}