Skip to content

Commit

Permalink
Tweak offset values to 16
Browse files Browse the repository at this point in the history
  • Loading branch information
richtabor committed Nov 3, 2023
1 parent 26f15ef commit 2199fc8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/block-library/src/image/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,26 +340,26 @@ store(
context.core.image.imageButtonTop =
( offsetHeight - referenceHeight ) / 2 +
buttonOffsetTop +
10;
16;
context.core.image.imageButtonRight =
buttonOffsetRight + 10;
buttonOffsetRight + 16;
} else {
// If it reaches the height first, keep
// the height and compute the width.
const referenceWidth =
offsetHeight * naturalRatio;
context.core.image.imageButtonTop =
buttonOffsetTop + 10;
buttonOffsetTop + 16;
context.core.image.imageButtonRight =
( offsetWidth - referenceWidth ) / 2 +
buttonOffsetRight +
10;
16;
}
} else {
context.core.image.imageButtonTop =
buttonOffsetTop + 10;
buttonOffsetTop + 16;
context.core.image.imageButtonRight =
buttonOffsetRight + 10;
buttonOffsetRight + 16;
}
},
setStylesOnResize: ( { state, context, ref } ) => {
Expand Down

0 comments on commit 2199fc8

Please sign in to comment.