diff --git a/editor/src/application.rs b/editor/src/application.rs index cc54caa8e3..dd745f890c 100644 --- a/editor/src/application.rs +++ b/editor/src/application.rs @@ -9,7 +9,7 @@ pub struct Editor { impl Editor { pub fn new(environment: Environment, uuid_random_seed: u64) -> Self { - ENVIRONMENT.set(environment).expect("Editor shoud only be initialized once"); + ENVIRONMENT.set(environment).expect("Editor should only be initialized once"); graphene_std::uuid::set_uuid_seed(uuid_random_seed); Self { dispatcher: Dispatcher::new() } diff --git a/editor/src/consts.rs b/editor/src/consts.rs index 716949cfaf..df2bba61ee 100644 --- a/editor/src/consts.rs +++ b/editor/src/consts.rs @@ -70,7 +70,7 @@ pub const COMPASS_ROSE_RING_INNER_DIAMETER: f64 = 13.; pub const COMPASS_ROSE_MAIN_RING_DIAMETER: f64 = 15.; pub const COMPASS_ROSE_HOVER_RING_DIAMETER: f64 = 23.; pub const COMPASS_ROSE_ARROW_SIZE: f64 = 5.; -// Angle to either side of the compass arrows where they are targetted by the cursor (in degrees, must be less than 45°) +// Angle to either side of the compass arrows where they are targeted by the cursor (in degrees, must be less than 45°) pub const COMPASS_ROSE_ARROW_CLICK_TARGET_ANGLE: f64 = 20.; // TRANSFORM OVERLAY diff --git a/editor/src/messages/layout/utility_types/layout_widget.rs b/editor/src/messages/layout/utility_types/layout_widget.rs index fef1061f27..f93b85cdcb 100644 --- a/editor/src/messages/layout/utility_types/layout_widget.rs +++ b/editor/src/messages/layout/utility_types/layout_widget.rs @@ -42,7 +42,7 @@ pub enum LayoutTarget { MenuBar, /// Bar at the top of the node graph containing the location and the "Preview" and "Hide" buttons. NodeGraphControlBar, - /// The body of the Properties panel containing many collapsable sections. + /// The body of the Properties panel containing many collapsible sections. PropertiesPanel, /// The contextual input key/mouse combination shortcuts shown in the status bar at the bottom of the window. StatusBarHints, diff --git a/editor/src/messages/portfolio/document/document_message_handler.rs b/editor/src/messages/portfolio/document/document_message_handler.rs index 76fbfa4828..9aac833333 100644 --- a/editor/src/messages/portfolio/document/document_message_handler.rs +++ b/editor/src/messages/portfolio/document/document_message_handler.rs @@ -3408,7 +3408,7 @@ mod document_message_handler_tests { editor.handle_message(NodeGraphMessage::SelectedNodesSet { nodes: vec![rect_layer.to_node()] }).await; editor.handle_message(DocumentMessage::MoveSelectedLayersTo { parent: folder1, insert_index: 0 }).await; - // Verifying rectagle is now in folder1 + // Verifying rectangle is now in folder1 let rect_parent = rect_layer.parent(editor.active_document().metadata()).unwrap(); assert_eq!(rect_parent, folder1, "Rectangle should be inside folder1"); @@ -3416,12 +3416,12 @@ mod document_message_handler_tests { editor.handle_message(NodeGraphMessage::SelectedNodesSet { nodes: vec![folder1.to_node()] }).await; editor.handle_message(DocumentMessage::MoveSelectedLayersTo { parent: folder2, insert_index: 0 }).await; - // Verifing hirarchy: folder2 > folder1 > rectangle +// Verifying hierarchy: folder2 > folder1 > rectangle let document = editor.active_document(); let folder1_parent = folder1.parent(document.metadata()).unwrap(); assert_eq!(folder1_parent, folder2, "Folder1 should be inside folder2"); - // Verifing rectangle moved with its parent + // Verifying rectangle moved with its parent let rect_parent = rect_layer.parent(document.metadata()).unwrap(); assert_eq!(rect_parent, folder1, "Rectangle should still be inside folder1"); @@ -3496,7 +3496,7 @@ mod document_message_handler_tests { let document = editor.active_document(); let rect_bbox_after = document.metadata().bounding_box_viewport(rect_layer).unwrap(); - // Verifing the rectangle maintains approximately the same position in viewport space + // Verifying the rectangle maintains approximately the same position in viewport space let before_center = (rect_bbox_before[0] + rect_bbox_before[1]) / 2.; // TODO: Should be: DVec2(0., -25.), regression (#2688) causes it to be: DVec2(100., 25.) let after_center = (rect_bbox_after[0] + rect_bbox_after[1]) / 2.; // TODO: Should be: DVec2(0., -25.), regression (#2688) causes it to be: DVec2(200., 75.) let distance = before_center.distance(after_center); // TODO: Should be: 0., regression (#2688) causes it to be: 111.80339887498948 diff --git a/editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs b/editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs index 7c2c1d0d6c..cf8d2976c1 100644 --- a/editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs +++ b/editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs @@ -371,7 +371,7 @@ impl MessageHandler> for Navigat ptz.set_zoom(ptz.zoom() * new_scale * VIEWPORT_ZOOM_TO_FIT_PADDING_SCALE_FACTOR); // Keep the canvas filling less than the full available viewport bounds if requested. - // And if the zoom is close to the full viewport bounds, we ignore the padding because 100% is preferrable if it still fits. + // And if the zoom is close to the full viewport bounds, we ignore the padding because 100% is preferable if it still fits. if prevent_zoom_past_100 && ptz.zoom() > VIEWPORT_ZOOM_TO_FIT_PADDING_SCALE_FACTOR { ptz.set_zoom(1.); } diff --git a/editor/src/messages/portfolio/document/overlays/utility_types_web.rs b/editor/src/messages/portfolio/document/overlays/utility_types_web.rs index 3c249dcbf2..2024dfcd85 100644 --- a/editor/src/messages/portfolio/document/overlays/utility_types_web.rs +++ b/editor/src/messages/portfolio/document/overlays/utility_types_web.rs @@ -600,7 +600,7 @@ impl OverlayContext { /// Transforms the canvas context to adjust for DPI scaling /// - /// Overwrites all existing tranforms. This operation can be reversed with [`Self::reset_transform`]. + /// Overwrites all existing transforms. This operation can be reversed with [`Self::reset_transform`]. fn start_dpi_aware_transform(&self) { let [a, b, c, d, e, f] = DAffine2::from_scale(DVec2::splat(self.viewport.scale())).to_cols_array(); self.render_context diff --git a/editor/src/messages/portfolio/document/utility_types/network_interface.rs b/editor/src/messages/portfolio/document/utility_types/network_interface.rs index 22680231e5..cf99621219 100644 --- a/editor/src/messages/portfolio/document/utility_types/network_interface.rs +++ b/editor/src/messages/portfolio/document/utility_types/network_interface.rs @@ -3744,7 +3744,7 @@ impl NodeNetworkInterface { Some(old_inputs) } - /// Used when opening an old document to add the persistent metadata for each input if it doesnt exist, which is where the name/description are saved. + /// Used when opening an old document to add the persistent metadata for each input if it doesn't exist, which is where the name/description are saved. pub fn validate_input_metadata(&mut self, node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId]) { let number_of_inputs = node.inputs.len(); let Some(metadata) = self.node_metadata_mut(node_id, network_path) else { return }; @@ -3877,7 +3877,7 @@ impl NodeNetworkInterface { return; } - // It is necessary to ensure the grpah is acyclic before calling `self.position` as it sometimes crashes with cyclic graphs #3227 + // It is necessary to ensure the graph is acyclic before calling `self.position` as it sometimes crashes with cyclic graphs #3227 let previous_metadata = match &previous_input { NodeInput::Node { node_id, .. } => self.position(node_id, network_path).map(|position| (*node_id, position)), _ => None, @@ -6436,7 +6436,7 @@ pub struct NavigationMetadata { /// The current pan, and zoom state of the viewport's view of the node graph. /// Ensure `DocumentMessage::UpdateDocumentTransform` is called when the pan, zoom, or transform changes. pub node_graph_ptz: PTZ, - // TODO: Eventually remove once te click targets are extracted from the native render + // TODO: Eventually remove once the click targets are extracted from the native render /// Transform from node graph space to viewport space. pub node_graph_to_viewport: DAffine2, // TODO: Eventually remove once the import/export positions are extracted from the native render diff --git a/editor/src/messages/portfolio/document_migration.rs b/editor/src/messages/portfolio/document_migration.rs index e704b16539..02b007edfa 100644 --- a/editor/src/messages/portfolio/document_migration.rs +++ b/editor/src/messages/portfolio/document_migration.rs @@ -1605,7 +1605,7 @@ fn migrate_node(node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId], // Decide on the placement position of the new Multiply node let multiply_node_id = NodeId::new(); let Some(transform_position) = document.network_interface.position_from_downstream_node(node_id, network_path) else { - log::error!("Could not get positon for transform node {node_id}"); + log::error!("Could not get position for transform node {node_id}"); return None; }; let multiply_position = transform_position + IVec2::new(-7, 1); diff --git a/editor/src/messages/tool/common_functionality/transformation_cage.rs b/editor/src/messages/tool/common_functionality/transformation_cage.rs index dba65b4080..de19f89464 100644 --- a/editor/src/messages/tool/common_functionality/transformation_cage.rs +++ b/editor/src/messages/tool/common_functionality/transformation_cage.rs @@ -372,13 +372,13 @@ pub fn snap_drag(start: DVec2, current: DVec2, snap_to_axis: bool, axis: Axis, s /// Contains info on the overlays for the bounding box and transform handles #[derive(Clone, Debug, Default)] pub struct BoundingBoxManager { - /// The corners of the box. Transform with original_bound_transform to get viewport co-ordinates. + /// The corners of the box. Transform with original_bound_transform to get viewport coordinates. pub bounds: [DVec2; 2], - /// The transform to viewport space for the bounds co-ordinates when the bounds were last updated. + /// The transform to viewport space for the bounds coordinates when the bounds were last updated. pub transform: DAffine2, /// Whether the transform is actually singular but adjusted to not be so. pub transform_tampered: bool, - /// The transform to viewport space for the bounds co-ordinates when the transformation was started. + /// The transform to viewport space for the bounds coordinates when the transformation was started. pub original_bound_transform: DAffine2, pub selected_edges: Option, pub original_transforms: OriginalTransforms, diff --git a/editor/src/messages/viewport/viewport_message_handler.rs b/editor/src/messages/viewport/viewport_message_handler.rs index a060a14efa..aebf01f3ac 100644 --- a/editor/src/messages/viewport/viewport_message_handler.rs +++ b/editor/src/messages/viewport/viewport_message_handler.rs @@ -523,7 +523,7 @@ impl Sub for PhysicalPoint { } } fn assert_scale(a: &T, b: &T) { - assert_eq!(a.scale(), b.scale(), "Cannot multiply with diffent scale"); + assert_eq!(a.scale(), b.scale(), "Cannot multiply with different scale"); } impl From<(f64, f64)> for Point { diff --git a/editor/src/node_graph_executor.rs b/editor/src/node_graph_executor.rs index b325bfd2ab..7a7bcdccba 100644 --- a/editor/src/node_graph_executor.rs +++ b/editor/src/node_graph_executor.rs @@ -316,7 +316,7 @@ impl NodeGraphExecutor { let Some((fid, execution_context)) = self.futures.pop_front() else { panic!("InvalidGenerationId") }; - assert_eq!(fid, execution_id, "Missmatch in execution id"); + assert_eq!(fid, execution_id, "Mismatch in execution id"); if let Some(export_config) = execution_context.export_config { // Special handling for exporting the artwork @@ -541,9 +541,9 @@ mod test { } impl Instrumented { - /// Adds montior nodes to the network + /// Adds monitor nodes to the network fn add(&mut self, network: &mut NodeNetwork, path: &mut Vec) { - // Required to do seperately to satiate the borrow checker. + // Required to do separately to satiate the borrow checker. let mut monitor_nodes = Vec::new(); for (id, node) in network.nodes.iter_mut() { // Recursively instrument