Remove partialeq for layers (#230)
# Conflicts: # Cargo.lock # core/document/Cargo.toml
This commit is contained in:
parent
0692bc8727
commit
ece23e7c5f
|
|
@ -118,8 +118,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kurbo"
|
name = "kurbo"
|
||||||
version = "0.8.3"
|
version = "0.8.1"
|
||||||
source = "git+https://github.com/linebender/kurbo.git#9ed4b73dac4f085065d7a6968121581cb8296089"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e30b1df631d23875f230ed3ddd1a88c231f269a04b2044eb6ca87e763b5f4c42"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@ license = "Apache-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
kurbo = {git="https://github.com/linebender/kurbo.git"}
|
kurbo = "0.8"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
glam = "0.16"
|
glam = "0.16"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use crate::{
|
||||||
DocumentError, DocumentResponse, LayerId, Operation,
|
DocumentError, DocumentResponse, LayerId, Operation,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Document {
|
pub struct Document {
|
||||||
pub root: Layer,
|
pub root: Layer,
|
||||||
pub work: Layer,
|
pub work: Layer,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use super::LayerData;
|
||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Default)]
|
#[derive(Debug, Clone, Copy, Default)]
|
||||||
pub struct Ellipse {}
|
pub struct Ellipse {}
|
||||||
|
|
||||||
impl Ellipse {
|
impl Ellipse {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use super::{style, Layer, LayerData, LayerDataTypes};
|
||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Folder {
|
pub struct Folder {
|
||||||
next_assignment_id: LayerId,
|
next_assignment_id: LayerId,
|
||||||
pub layer_ids: Vec<LayerId>,
|
pub layer_ids: Vec<LayerId>,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use super::LayerData;
|
||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct Line {}
|
pub struct Line {}
|
||||||
|
|
||||||
impl Line {
|
impl Line {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ pub trait LayerData {
|
||||||
fn to_kurbo_path(&mut self, transform: glam::DAffine2, style: style::PathStyle) -> BezPath;
|
fn to_kurbo_path(&mut self, transform: glam::DAffine2, style: style::PathStyle) -> BezPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum LayerDataTypes {
|
pub enum LayerDataTypes {
|
||||||
Folder(Folder),
|
Folder(Folder),
|
||||||
Ellipse(Ellipse),
|
Ellipse(Ellipse),
|
||||||
|
|
@ -77,7 +77,7 @@ impl LayerDataTypes {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Layer {
|
pub struct Layer {
|
||||||
pub visible: bool,
|
pub visible: bool,
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use std::fmt::Write;
|
||||||
|
|
||||||
use super::{style, LayerData};
|
use super::{style, LayerData};
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct PolyLine {
|
pub struct PolyLine {
|
||||||
points: Vec<glam::DVec2>,
|
points: Vec<glam::DVec2>,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use super::LayerData;
|
||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Rect {}
|
pub struct Rect {}
|
||||||
|
|
||||||
impl Rect {
|
impl Rect {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use super::LayerData;
|
||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Shape {
|
pub struct Shape {
|
||||||
equal_sides: bool,
|
equal_sides: bool,
|
||||||
sides: u8,
|
sides: u8,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue