Add an editor preference for touched/enclosed/directional based selection (#2156)

* implemented left selection logic

* added logic for right ward selection

* removed the logs code

* corrected capitalization error

* corrected capitalization error

* added radio buttons for selection_mode

* fixed multiple selection of checkboxes

* adapted to the RadioEntryData

* State management bug

* integrated message system to selection_mode

* updated

* updated

* added selection mode to transition arms

* removed from portfolio message and added preference in ToolMessageData

* removed dead code of selection_mode from frontend logic

* removed dead code for zoomWithScroll

* Cleanup

* Rename, simplify, use dashed box, and highlight only outlines of layers that'll get selected

* More code review

---------

Co-authored-by: Pratik Agrawal <patrik@Pratiks-MacBook-Air.local>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Pratik Agrawal
2025-01-26 06:34:37 +00:00
committed by GitHub
co-authored by Pratik Agrawal Keavon Chambers
parent 93880abc4c
commit 96c57605b7
17 changed files with 266 additions and 113 deletions
@@ -1,14 +1,18 @@
use crate::messages::preferences::SelectionMode;
use crate::messages::prelude::*;
#[impl_message(Message, Preferences)]
#[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize)]
pub enum PreferencesMessage {
// Management messages
Load { preferences: String },
ResetToDefaults,
ImaginateRefreshFrequency { seconds: f64 },
// Per-preference messages
UseVello { use_vello: bool },
ImaginateServerHostname { hostname: String },
SelectionMode { selection_mode: SelectionMode },
VectorMeshes { enabled: bool },
ModifyLayout { zoom_with_scroll: bool },
// ImaginateRefreshFrequency { seconds: f64 },
// ImaginateServerHostname { hostname: String },
}