feat: use enter to edit line points & update hints (#9630)
feat: use enter to edit line points & update hints
This commit is contained in:
@@ -4430,12 +4430,11 @@ class App extends React.Component<AppProps, AppState> {
|
||||
const selectedElements = this.scene.getSelectedElements(this.state);
|
||||
if (selectedElements.length === 1) {
|
||||
const selectedElement = selectedElements[0];
|
||||
if (event[KEYS.CTRL_OR_CMD]) {
|
||||
if (event[KEYS.CTRL_OR_CMD] || isLineElement(selectedElement)) {
|
||||
if (isLinearElement(selectedElement)) {
|
||||
if (
|
||||
!this.state.editingLinearElement ||
|
||||
this.state.editingLinearElement.elementId !==
|
||||
selectedElements[0].id
|
||||
this.state.editingLinearElement.elementId !== selectedElement.id
|
||||
) {
|
||||
this.store.scheduleCapture();
|
||||
if (!isElbowArrow(selectedElement)) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
isFlowchartNodeElement,
|
||||
isImageElement,
|
||||
isLinearElement,
|
||||
isLineElement,
|
||||
isTextBindableContainer,
|
||||
isTextElement,
|
||||
} from "@excalidraw/element";
|
||||
@@ -138,7 +139,9 @@ const getHints = ({
|
||||
? t("hints.lineEditor_pointSelected")
|
||||
: t("hints.lineEditor_nothingSelected");
|
||||
}
|
||||
return t("hints.lineEditor_info");
|
||||
return isLineElement(selectedElements[0])
|
||||
? t("hints.lineEditor_line_info")
|
||||
: t("hints.lineEditor_info");
|
||||
}
|
||||
if (
|
||||
!appState.newElement &&
|
||||
|
||||
Reference in New Issue
Block a user