mirror of https://github.com/sveltejs/svelte
- divide the getBoundingClientRect dimensions by clientHeight or clientWidth - this gives us the element's scaled values as scaleX and scaleY - divide the "dx" and "dy" by the "scaleX" and "scaleY" This aims to fix #3555 by using the node's un-scaled width/height to calculate the amount it has been scaled. Then dividing the distance by this scale factor removes the janky start position which was shown in the test case. resolves #3555pull/3627/head
parent
5dda05213e
commit
fbf4cbf22c
Loading…
Reference in new issue