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 Keavon Chambers
parent 1d2bb6fb2b
commit 94c42ff5d7
17 changed files with 570 additions and 34 deletions

View File

@@ -2,9 +2,10 @@ use crate::{DocumentError, LayerId};
use super::{style, Layer, LayerData, LayerDataTypes};
use serde::{Deserialize, Serialize};
use std::fmt::Write;
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
pub struct Folder {
next_assignment_id: LayerId,
pub layer_ids: Vec<LayerId>,