Refactor: enable node copy for multiple selection
This commit is contained in:
parent
2d737a9fa5
commit
63113aa8ea
1 changed files with 2 additions and 1 deletions
|
|
@ -228,7 +228,8 @@ export default function Page({
|
|||
}
|
||||
|
||||
function handleCopy(e: KeyboardEvent) {
|
||||
if (!isWrappedWithClass(e, "nocopy") && isWrappedWithClass(e, "react-flow__node")) {
|
||||
const multipleSelection = lastSelection?.nodes ? lastSelection?.nodes.length > 0 : false;
|
||||
if (!isWrappedWithClass(e, "nocopy") && (isWrappedWithClass(e, "react-flow__node") || multipleSelection)) {
|
||||
e.preventDefault();
|
||||
(e as unknown as Event).stopImmediatePropagation();
|
||||
if (window.getSelection()?.toString().length === 0 && lastSelection) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue