mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-22 19:18:30 +00:00
Make graph state 'Clone'able
This commit is contained in:
parent
54ae2dc45f
commit
007c3e5480
@ -4,6 +4,7 @@ use crate::{color_hex_utils::*, NodeTemplateIter, NodeTemplateTrait};
|
|||||||
|
|
||||||
use egui::*;
|
use egui::*;
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
#[cfg_attr(feature = "persistence", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "persistence", derive(serde::Serialize, serde::Deserialize))]
|
||||||
pub struct NodeFinder<NodeTemplate> {
|
pub struct NodeFinder<NodeTemplate> {
|
||||||
pub query: String,
|
pub query: String,
|
||||||
|
|||||||
@ -10,6 +10,7 @@ pub struct PanZoom {
|
|||||||
pub zoom: f32,
|
pub zoom: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
#[cfg_attr(feature = "persistence", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "persistence", derive(Serialize, Deserialize))]
|
||||||
pub struct GraphEditorState<NodeData, DataType, ValueType, NodeTemplate, UserState> {
|
pub struct GraphEditorState<NodeData, DataType, ValueType, NodeTemplate, UserState> {
|
||||||
pub graph: Graph<NodeData, DataType, ValueType>,
|
pub graph: Graph<NodeData, DataType, ValueType>,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user