Skip to content

Commit

Permalink
Switch back variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Feb 16, 2021
1 parent 52a8066 commit 6eb17c5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/block-library/src/navigation-link/edit.js
Expand Up @@ -152,7 +152,7 @@ export default function NavigationLinkEdit( {
const ref = useRef();

const {
isBeingDragged,
isDraggingBlocks,
isParentOfSelectedBlock,
isImmediateParentOfSelectedBlock,
hasDescendants,
Expand All @@ -166,7 +166,7 @@ export default function NavigationLinkEdit( {
getClientIdsOfDescendants,
hasSelectedInnerBlock,
getSelectedBlockClientId,
isDraggingBlocks,
isDraggingBlocks: _isDraggingBlocks,
} = select( blockEditorStore );

const selectedBlockId = getSelectedBlockClientId();
Expand All @@ -188,7 +188,7 @@ export default function NavigationLinkEdit( {
selectedBlockId,
] )?.length,
numberOfDescendants: descendants,
isBeingDragged: isDraggingBlocks(),
isDraggingBlocks: _isDraggingBlocks(),
userCanCreatePages: select( coreStore ).canUser(
'create',
'pages'
Expand Down Expand Up @@ -292,9 +292,9 @@ export default function NavigationLinkEdit( {
'is-editing':
( isSelected || isParentOfSelectedBlock ) &&
// Don't show the element as editing while dragging.
! isBeingDragged,
! isDraggingBlocks,
// Don't select the element while dragging.
'is-selected': isSelected && ! isBeingDragged,
'is-selected': isSelected && ! isDraggingBlocks,
'is-dragging-within': isDraggingWithin,
'has-link': !! url,
'has-child': hasDescendants,
Expand All @@ -315,7 +315,7 @@ export default function NavigationLinkEdit( {
'is-parent-of-selected-block':
isParentOfSelectedBlock &&
// Don't select as parent of selected block while dragging.
! isBeingDragged,
! isDraggingBlocks,
} ),
},
{
Expand All @@ -325,7 +325,7 @@ export default function NavigationLinkEdit( {
( isImmediateParentOfSelectedBlock &&
! selectedBlockHasDescendants ) ||
// Show the appender while dragging to allow inserting element between item and the appender.
( isBeingDragged && hasDescendants )
( isDraggingBlocks && hasDescendants )
? InnerBlocks.DefaultAppender
: false,
__experimentalAppenderTagName: 'li',
Expand Down

0 comments on commit 6eb17c5

Please sign in to comment.