Improved dialog stack handling of scrolling while the stack is open

This commit is contained in:
Stefan Zermatten
2019-02-18 13:41:36 +02:00
parent d30ee06e33
commit c5899e0816
3 changed files with 67 additions and 9 deletions

View File

@@ -37,8 +37,8 @@ const transformedBoxShadow = (shadowString, deltaWidth, deltaHeight) => {
export default function mockElement({source, target, offset = {x: 0, y: 0}}){
if (!source || !target) throw `Can't mock without ${source ? 'target' : 'source'}` ;
sourceRect = source.getBoundingClientRect();
targetRect = target.getBoundingClientRect();
let sourceRect = source.getBoundingClientRect();
let targetRect = target.getBoundingClientRect();
// Get how must the target change to become the source
const deltaWidth = sourceRect.width / targetRect.width;