Ignore scale factor when refreshing the step placeholder dimensions
This commit is contained in:
parent
b1eaf8ec71
commit
987592dc85
|
@ -48,7 +48,8 @@
|
||||||
let blockDims
|
let blockDims
|
||||||
|
|
||||||
const updateBlockDims = () => {
|
const updateBlockDims = () => {
|
||||||
blockDims = blockEle?.getBoundingClientRect()
|
const { width, height } = blockEle?.getBoundingClientRect()
|
||||||
|
blockDims = { width: width / $view.scale, height: height / $view.scale }
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadSteps = blockRef => {
|
const loadSteps = blockRef => {
|
||||||
|
@ -81,11 +82,11 @@
|
||||||
|
|
||||||
$: selected = $view?.moveStep && $view?.moveStep?.id === block.id
|
$: selected = $view?.moveStep && $view?.moveStep?.id === block.id
|
||||||
|
|
||||||
$: {
|
$: if (selected && blockEle) {
|
||||||
selected, updateBlockDims()
|
updateBlockDims()
|
||||||
}
|
}
|
||||||
|
|
||||||
$: placeholderDims = buildPlaceholderStyles(blockDims, selected)
|
$: placeholderDims = buildPlaceholderStyles(blockDims)
|
||||||
|
|
||||||
// Move the selected item
|
// Move the selected item
|
||||||
// Listen for scrolling in the content. As its scrolled this will be updated
|
// Listen for scrolling in the content. As its scrolled this will be updated
|
||||||
|
|
Loading…
Reference in New Issue