feat(duplcate_element): add comments

This commit is contained in:
Jeremy Scatigna 2020-01-08 14:46:12 +01:00
parent ccfcbe3984
commit 2eff4779a4

View file

@ -671,7 +671,7 @@ class App extends React.Component<{}, AppState> {
if (!e.shiftKey) {
clearSelection(elements);
}
// No matter what, we select it
// We duplicate the selected element if alt is pressed on Mouse down
if (e.altKey) {
const element = newElement(
hitElement.type,
@ -689,6 +689,7 @@ class App extends React.Component<{}, AppState> {
elements.push(element);
}
// No matter what, we select it
hitElement.isSelected = true;
}
} else {