mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
This commit is contained in:
parent
b9d584714a
commit
242ccac290
3 changed files with 38 additions and 2 deletions
|
@ -1530,6 +1530,8 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
});
|
||||
});
|
||||
|
||||
this.maybeSuggestBindingForAll(selectedElements);
|
||||
|
||||
event.preventDefault();
|
||||
} else if (event.key === KEYS.ENTER) {
|
||||
const selectedElements = getSelectedElements(
|
||||
|
@ -1601,6 +1603,16 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
if (!event[KEYS.CTRL_OR_CMD] && !this.state.isBindingEnabled) {
|
||||
this.setState({ isBindingEnabled: true });
|
||||
}
|
||||
if (isArrowKey(event.key)) {
|
||||
const selectedElements = getSelectedElements(
|
||||
this.scene.getElements(),
|
||||
this.state,
|
||||
);
|
||||
isBindingEnabled(this.state)
|
||||
? bindOrUnbindSelectedElements(selectedElements)
|
||||
: unbindLinearElements(selectedElements);
|
||||
this.setState({ suggestedBindings: [] });
|
||||
}
|
||||
});
|
||||
|
||||
private selectShapeTool(elementType: AppState["elementType"]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue