diff --git a/frontend/src/app/main/ui/workspace/shapes/text/v3_editor.cljs b/frontend/src/app/main/ui/workspace/shapes/text/v3_editor.cljs index 9fd4a23e99..d0cb12caeb 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/v3_editor.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/v3_editor.cljs @@ -334,8 +334,6 @@ :on-cut on-cut :on-focus on-focus :on-blur on-blur - ;; FIXME on-click - ;; :on-click on-click :id "text-editor-wasm-input" :class (dm/str (cur/get-dynamic "text" (:rotation shape)) " " diff --git a/render-wasm/src/shapes/text.rs b/render-wasm/src/shapes/text.rs index 298b44cc55..8bc6568c74 100644 --- a/render-wasm/src/shapes/text.rs +++ b/render-wasm/src/shapes/text.rs @@ -673,7 +673,7 @@ impl TextContent { }); let size = TextContentSize::new_with_normalized_line_height( - width, + width.ceil(), paragraph_height.ceil(), DEFAULT_TEXT_CONTENT_SIZE, normalized_line_height, @@ -708,12 +708,12 @@ impl TextContent { pub fn set_layout_from_result( &mut self, result: TextContentLayoutResult, - default_height: f32, default_width: f32, + default_height: f32, ) { self.layout.set(result.0, result.1); self.size - .copy_finite_size(result.2, default_height, default_width); + .copy_finite_size(result.2, default_width, default_height); } pub fn update_layout(&mut self, selrect: Rect) -> TextContentSize { diff --git a/render-wasm/src/wasm/text.rs b/render-wasm/src/wasm/text.rs index 737925b9b4..c4f6a682d5 100644 --- a/render-wasm/src/wasm/text.rs +++ b/render-wasm/src/wasm/text.rs @@ -308,7 +308,6 @@ pub extern "C" fn set_shape_text_content() -> crate::error::Result<()> { #[no_mangle] pub extern "C" fn set_shape_grow_type(grow_type: u8) { let grow_type = RawGrowType::from(grow_type); - with_current_shape_mut!(state, |shape: &mut Shape| { if let Type::Text(text_content) = &mut shape.shape_type { text_content.set_grow_type(GrowType::from(grow_type));