Browse Source

Also for text

pull/28/head
Christopher Chedeau 6 years ago
parent
commit
9aaaa24426
  1. 4
      src/index.js

4
src/index.js

@ -252,12 +252,16 @@ function App() { @@ -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();

Loading…
Cancel
Save