Prevent dragging of selected locked nodes
This commit is contained in:
parent
728790f73c
commit
de1faa00df
@ -191,6 +191,8 @@ function Note({
|
||||
return null;
|
||||
}
|
||||
|
||||
const noteName = `note${note.locked ? "-locked" : ""}`;
|
||||
|
||||
return (
|
||||
<animated.Group
|
||||
{...props}
|
||||
@ -212,6 +214,7 @@ function Note({
|
||||
onMouseEnter={handlePointerEnter}
|
||||
onMouseLeave={handlePointerLeave}
|
||||
opacity={note.visible ? noteOpacity : 0.5}
|
||||
name={noteName}
|
||||
>
|
||||
{!note.textOnly && (
|
||||
<Rect
|
||||
|
@ -69,7 +69,8 @@ function Selection({
|
||||
if (stage) {
|
||||
for (let item of selection.items) {
|
||||
const node = stage.findOne(`#${item.id}`);
|
||||
if (node) {
|
||||
// Don't drag locked nodes
|
||||
if (node && !node.name().endsWith("-locked")) {
|
||||
intersectingNodesRef.current.push({
|
||||
...item,
|
||||
node,
|
||||
|
Loading…
Reference in New Issue
Block a user