fix selecting elem inside already selected element (#349)

This commit is contained in:
David Luzar 2020-01-12 20:43:31 +01:00 committed by Christopher Chedeau
parent 5887be6eda
commit 58ad6d741d

View File

@ -510,13 +510,8 @@ export class App extends React.Component<{}, AppState> {
document.documentElement.style.cursor = `${resizeHandle}-resize`;
isResizingElements = true;
} else {
const selected = getElementAtPosition(
elements.filter(el => el.isSelected),
x,
y
);
// clear selection if shift is not clicked
if (!selected && !e.shiftKey) {
if (!e.shiftKey) {
elements = clearSelection(elements);
}
hitElement = getElementAtPosition(elements, x, y);