mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 05:28:11 +08:00
Move layer selection logic from vue to editor (#410)
* Add vue selectLayer(layer, ctrl, shift) * Individual selection working, range fill next * Frontend package-lock.json seems apparently needs to be pushed. Weird. * Selection working with ctrl, shift from editor. Still some bugs to sqaush with folder nesting. * WIP resolving nesting folders issues * Changed comparison approach, handling corner cases now * Fully working selection. * Reverted changes to package-lock.json * Removed unused code * Resolved ctrl click not behaving similar to windows * Slight comment clarification * Double checked a windows behavior and corrected. Changed last_selected name. * Simplified if statement slightly. * Made the naming clearer regarding UUIDs versus indices * Clarified comments further * Minor comment fixup * Implemented suggestions, clarified comments * Resolved todo regarding clearing selection when ctrl not pressed * Ensure we only push responses when needed Co-authored-by: Keavon Chambers <keavon@keavon.com> Reviewed by: @TrueDoctor <3
This commit is contained in:
committed by
Keavon Chambers
parent
80a3e41654
commit
3fc6e05a12
@@ -322,6 +322,11 @@ impl JsEditorHandle {
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
pub fn select_layer(&self, paths: Vec<LayerId>, ctrl: bool, shift: bool) {
|
||||
let message = DocumentMessage::SelectLayer(paths, ctrl, shift);
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Select all layers
|
||||
pub fn select_all_layers(&self) {
|
||||
let message = DocumentMessage::SelectAllLayers;
|
||||
@@ -443,7 +448,7 @@ impl JsEditorHandle {
|
||||
|
||||
/// Requests the backend to add a layer to the layer list
|
||||
pub fn add_folder(&self, path: Vec<LayerId>) {
|
||||
let message = DocumentMessage::CreateFolder(path);
|
||||
let message = DocumentMessage::CreateEmptyFolder(path);
|
||||
self.dispatch(message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user