Copy and paste layers MVP (#220)

* Initial implementation of copy and paste for layers

* Sort layers on copy and add tests

* Fix logger init for test

* Fix `copy_paste_deleted_layers` test

* Readd erroneously removed svg

* Make Layer serializable and cleanup

* Add test for copy and pasting folders

* Cleanup

* Rename left_mouseup

* Cleanup

* Add length check to test

* Fix typo

* Make mouseup, mousedown more consistent
This commit is contained in:
Till Arnold
2021-07-05 00:34:47 +02:00
committed by GitHub
parent 7b65409c58
commit 20420c1286
17 changed files with 570 additions and 34 deletions

View File

@@ -1,4 +1,7 @@
use crate::{layers::style, LayerId};
use crate::{
layers::{style, Layer},
LayerId,
};
use serde::{Deserialize, Serialize};
@@ -44,6 +47,10 @@ pub enum Operation {
DuplicateLayer {
path: Vec<LayerId>,
},
PasteLayer {
layer: Layer,
path: Vec<LayerId>,
},
AddFolder {
path: Vec<LayerId>,
},