Fix a minor regression in monitor nodes with VectorData (#2237)

* Fix a minor regression in monitor nodes with VectorData

* Use type alias instead of full type

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
James Lindsay 2025-01-29 19:53:46 +00:00 committed by GitHub
parent 95f6bb82ff
commit dbf917ef71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -16,12 +16,12 @@ use graphene_core::text::FontCache;
use graphene_core::transform::Footprint;
use graphene_core::vector::style::ViewMode;
use graphene_std::renderer::{format_transform_matrix, RenderMetadata};
use graphene_std::vector::VectorData;
use graphene_std::vector::{VectorData, VectorDataTable};
use graphene_std::wasm_application_io::{WasmApplicationIo, WasmEditorApi};
use interpreted_executor::dynamic_executor::{DynamicExecutor, IntrospectError, ResolvedDocumentNodeTypesDelta};
use interpreted_executor::util::wrap_network_in_scope;
use glam::{DAffine2, DVec2, UVec2};
use interpreted_executor::util::wrap_network_in_scope;
use once_cell::sync::Lazy;
use spin::Mutex;
use std::sync::mpsc::{Receiver, Sender};
@ -296,10 +296,10 @@ impl NodeRuntime {
Self::process_graphic_element(&mut self.thumbnail_renders, parent_network_node_id, &io.output, responses, update_thumbnails)
}
// Insert the vector modify if we are dealing with vector data
else if let Some(record) = introspected_data.downcast_ref::<IORecord<Footprint, VectorData>>() {
self.vector_modify.insert(parent_network_node_id, record.output.clone());
} else if let Some(record) = introspected_data.downcast_ref::<IORecord<(), VectorData>>() {
self.vector_modify.insert(parent_network_node_id, record.output.clone());
else if let Some(record) = introspected_data.downcast_ref::<IORecord<Footprint, VectorDataTable>>() {
self.vector_modify.insert(parent_network_node_id, record.output.one_item().clone());
} else if let Some(record) = introspected_data.downcast_ref::<IORecord<(), VectorDataTable>>() {
self.vector_modify.insert(parent_network_node_id, record.output.one_item().clone());
}
}
}