Skip to content

Commit

Permalink
Try fixing up drop indicator line positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Apr 5, 2023
1 parent faad063 commit 3e2ab5f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export default function ListViewDropIndicator( {
'.block-editor-block-icon'
);
const rootBlockIconRect = rootBlockIconElement.getBoundingClientRect();
return rootBlockIconRect.right - targetElementRect.left;
return (
rootBlockIconRect.right -
targetElementRect.left -
rootBlockIconRect.width / 2 // Reduce the indentation by half the icon width.
);
}, [ rootBlockElement, targetElement ] );

const style = useMemo( () => {
Expand Down

0 comments on commit 3e2ab5f

Please sign in to comment.