Also for text

This commit is contained in:
Christopher Chedeau 2020-01-01 21:13:01 -08:00
parent 2fa00f39fc
commit 9aaaa24426
1 changed files with 4 additions and 0 deletions

View File

@ -252,12 +252,16 @@ function App() {
elements.push(element);
if (elementType === "text") {
setDraggingElement(null);
element.isSelected = true;
} else {
setDraggingElement(element);
}
drawScene();
}}
onMouseUp={e => {
if (draggingElement === null) {
return;
}
if (elementType === "selection") {
// Remove actual selection element
elements.pop();