Skip to content

Commit

Permalink
Ignore scale factor when refreshing the step placeholder dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
deanhannigan committed Oct 31, 2024
1 parent b1eaf8e commit 987592d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
let blockDims
const updateBlockDims = () => {
blockDims = blockEle?.getBoundingClientRect()
const { width, height } = blockEle?.getBoundingClientRect()
blockDims = { width: width / $view.scale, height: height / $view.scale }
}
const loadSteps = blockRef => {
Expand Down Expand Up @@ -81,11 +82,11 @@
$: selected = $view?.moveStep && $view?.moveStep?.id === block.id
$: {
selected, updateBlockDims()
$: if (selected && blockEle) {
updateBlockDims()
}
$: placeholderDims = buildPlaceholderStyles(blockDims, selected)
$: placeholderDims = buildPlaceholderStyles(blockDims)
// Move the selected item
// Listen for scrolling in the content. As its scrolled this will be updated
Expand Down

0 comments on commit 987592d

Please sign in to comment.