mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 03:18:11 +08:00
@@ -92,7 +92,7 @@ pub enum GraphOperationMessage {
|
||||
id: NodeId,
|
||||
text: String,
|
||||
font: Font,
|
||||
size: f64,
|
||||
size: f32,
|
||||
parent: LayerNodeIdentifier,
|
||||
insert_index: isize,
|
||||
},
|
||||
|
||||
+2
-2
@@ -205,13 +205,13 @@ impl<'a> ModifyInputsContext<'a> {
|
||||
self.responses.add(NodeGraphMessage::SendGraph { should_rerender: true });
|
||||
}
|
||||
|
||||
fn insert_text(&mut self, text: String, font: Font, size: f64, layer: NodeId) {
|
||||
fn insert_text(&mut self, text: String, font: Font, size: f32, layer: NodeId) {
|
||||
let text = resolve_document_node_type("Text").expect("Text node does not exist").to_document_node(
|
||||
[
|
||||
NodeInput::Network(graph_craft::concrete!(graphene_std::wasm_application_io::WasmEditorApi)),
|
||||
NodeInput::value(TaggedValue::String(text), false),
|
||||
NodeInput::value(TaggedValue::Font(font), false),
|
||||
NodeInput::value(TaggedValue::F64(size), false),
|
||||
NodeInput::value(TaggedValue::F32(size), false),
|
||||
],
|
||||
Default::default(),
|
||||
);
|
||||
|
||||
+1
-1
@@ -2483,7 +2483,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
||||
NodeInput::Network(concrete!(application_io::EditorApi<graphene_std::wasm_application_io::WasmApplicationIo>)),
|
||||
NodeInput::Network(concrete!(String)),
|
||||
NodeInput::Network(concrete!(graphene_core::text::Font)),
|
||||
NodeInput::Network(concrete!(f64)),
|
||||
NodeInput::Network(concrete!(f32)),
|
||||
],
|
||||
implementation: DocumentNodeImplementation::Unresolved(ProtoNodeIdentifier::new("graphene_core::text::TextGeneratorNode<_, _, _>")),
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user