Update locked state data to adjust the refactor

This commit is contained in:
haikalvidya
2024-03-27 23:40:48 +07:00
parent 11da13e84e
commit 601e45e1f3
5 changed files with 43 additions and 19 deletions

View File

@@ -162,6 +162,9 @@ pub struct DocumentNode {
/// Represents the eye icon for hiding/showing the node in the graph UI. When hidden, a node gets replaced with an identity node during the graph flattening step.
#[serde(default = "return_true")]
pub visible: bool,
/// Represents the lock icon for locking/unlocking the node in the graph UI. When locked, a node cannot be moved in the graph UI.
#[serde(default)]
pub locked: bool,
/// Metadata about the node including its position in the graph UI.
pub metadata: DocumentNodeMetadata,
/// When two different proto nodes hash to the same value (e.g. two value nodes each containing `2_u32` or two multiply nodes that have the same node IDs as input), the duplicates are removed.
@@ -210,6 +213,7 @@ impl Default for DocumentNode {
has_primary_output: true,
implementation: Default::default(),
visible: true,
locked: Default::default(),
metadata: Default::default(),
skip_deduplication: Default::default(),
world_state_hash: Default::default(),