diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/marker.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/marker.rs index b02abafe1..a14245995 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/marker.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/marker.rs @@ -1,4 +1,4 @@ -use super::model::{SeparationNode, SeparationNote, TextMaskArea}; +use super::model::SeparationNode; use base64::Engine as _; use std::path::Path; use std::path::PathBuf; @@ -246,6 +246,7 @@ fn draw_brush( #[cfg(test)] mod tests { use super::*; + use crate::ui_editor::commands::separation::{SeparationNote, TextMaskArea}; #[test] fn draw_frame_adds_green_cross_corner_lines() { @@ -287,10 +288,15 @@ mod tests { height_px: 6, note: SeparationNote::default(), text_mask_areas: vec![TextMaskArea { - global_pos_x_px: 2, - global_pos_y_px: 3, - width_px: 2, - height_px: 2, + global_pos_x_px: 0, + global_pos_y_px: 0, + width_px: 1, + height_px: 1, + }, TextMaskArea { + global_pos_x_px: 1, + global_pos_y_px: 1, + width_px: 1, + height_px: 1, }], children: vec![], rework_count: 0, @@ -316,7 +322,7 @@ mod tests { 8, 8, ); - assert_eq!(*image.get_pixel(2, 4), PURPLE_FILL); + assert_eq!(*image.get_pixel(0, 0), PURPLE_FILL); assert_eq!(*image.get_pixel(1, 1), image::Rgba([0, 255, 0, 255])); } } diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/binding.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/binding.rs index d552e8b12..c21b4388d 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/binding.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/binding.rs @@ -2,7 +2,7 @@ use crate::ui_editor::utils::NodeId; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, JsonSchema)] +#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize, JsonSchema)] #[schemars(deny_unknown_fields)] pub struct BindingArea { pub global_pos_x_px: u32,