Make the Text tool delete empty text layers when clicking away wth LMB (#2192)

Fix additions of layers when using left click

Fixes: 1327376421
This commit is contained in:
mTvare 2025-01-13 07:47:44 +05:30 committed by GitHub
parent 3582126ded
commit d692538736
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View file

@ -433,8 +433,8 @@ impl EditorHandle {
/// A text box was committed
#[wasm_bindgen(js_name = onChangeText)]
pub fn on_change_text(&self, new_text: String, is_right_click: bool) -> Result<(), JsValue> {
let message = TextToolMessage::TextChange { new_text, is_right_click };
pub fn on_change_text(&self, new_text: String, is_left_or_right_click: bool) -> Result<(), JsValue> {
let message = TextToolMessage::TextChange { new_text, is_left_or_right_click };
self.dispatch(message);
Ok(())