Ignore scale factor when refreshing the step placeholder dimensions

This commit is contained in:
Dean 2024-10-31 10:38:24 +00:00
parent b1eaf8ec71
commit 987592dc85
1 changed files with 5 additions and 4 deletions

View File

@ -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 => {
@ -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