Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update packages/block-editor/src/components/block-popover/index.js
Co-authored-by: Lena Morita <[email protected]>
  • Loading branch information
ciampo and mirka authored Aug 31, 2022
commit 58650ce8a73b31832875f6883c2ff81b1b6a16cf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function BlockPopover(
// Get the biggest rectangle that encompasses completely the currently
// selected element and the last selected element:
// - for top/left coordinates, use the smaller numbers
// - for the bottom/right coordinates, use the larget numbers
// - for the bottom/right coordinates, use the largest numbers
const left = Math.min( selectedBCR.left, lastSelectedBCR.left );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is an improved version of the same logic inside the Popover component

const top = Math.min( selectedBCR.top, lastSelectedBCR.top );
const right = Math.max(
Expand Down