Also for text
This commit is contained in:
parent
2fa00f39fc
commit
9aaaa24426
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user