🔧 Fix cross-browser text issues

This commit is contained in:
Elena Torro
2025-11-05 14:41:27 +01:00
parent bb65782d08
commit f496ba78f3
11 changed files with 117 additions and 10 deletions

View File

@@ -22,6 +22,7 @@ pub(crate) struct State<'a> {
pub render_state: RenderState,
pub text_editor_state: TextEditorState,
pub current_id: Option<Uuid>,
pub current_browser: u8,
pub shapes: ShapesPool<'a>,
}
@@ -31,6 +32,7 @@ impl<'a> State<'a> {
render_state: RenderState::new(width, height),
text_editor_state: TextEditorState::new(),
current_id: None,
current_browser: 0,
shapes: ShapesPool::new(),
}
}
@@ -123,6 +125,10 @@ impl<'a> State<'a> {
self.render_state.set_background_color(color);
}
pub fn set_browser(&mut self, browser: u8) {
self.current_browser = browser;
}
/// Sets the parent for the current shape and updates the parent's extended rectangle
///
/// When a shape is assigned a new parent, the parent's extended rectangle needs to be