mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
ensure click-to-select is exclusive (fixes #43)
This commit is contained in:
parent
e9bc1eb98a
commit
c6a6519cda
1 changed files with 5 additions and 2 deletions
|
@ -407,10 +407,13 @@ class App extends React.Component<{}, AppState> {
|
|||
return isSelected;
|
||||
});
|
||||
|
||||
// deselect everything except target element to-be-selected
|
||||
elements.forEach(element => {
|
||||
if (element === selectedElement) return;
|
||||
element.isSelected = false;
|
||||
});
|
||||
if (selectedElement) {
|
||||
this.setState({ draggingElement: selectedElement });
|
||||
} else {
|
||||
clearSelection();
|
||||
}
|
||||
|
||||
isDraggingElements = elements.some(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue