Also for text

This commit is contained in:
Christopher Chedeau 2020-01-01 21:13:01 -08:00
parent 2fa00f39fc
commit 9aaaa24426

View File

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