mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 07:20:21 +02:00
fix: prevent double-click to edit/create text scenarios on line (#9597)
* fix : double click on line enables line editor * fix : prevent double-click to edit/create text when inside line editor * refactor: use lineCheck instead of arrowCheck in doubleClick handler to align with updated logic * fix: replace negative arrowCheck with lineCheck in dbl click handler and fix double-click bind text test in linearElementEditor tests * clean up test * simplify check * add tests * prevent text editing on dblclick when inside arrow editor --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
@@ -129,6 +129,15 @@ export const isElbowArrow = (
|
||||
return isArrowElement(element) && element.elbowed;
|
||||
};
|
||||
|
||||
/**
|
||||
* sharp or curved arrow, but not elbow
|
||||
*/
|
||||
export const isSimpleArrow = (
|
||||
element?: ExcalidrawElement,
|
||||
): element is ExcalidrawArrowElement => {
|
||||
return isArrowElement(element) && !element.elbowed;
|
||||
};
|
||||
|
||||
export const isSharpArrow = (
|
||||
element?: ExcalidrawElement,
|
||||
): element is ExcalidrawArrowElement => {
|
||||
|
Reference in New Issue
Block a user