diff options
Diffstat (limited to 'src/utils.mjs')
-rw-r--r-- | src/utils.mjs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils.mjs b/src/utils.mjs index c0da23a..4cce323 100644 --- a/src/utils.mjs +++ b/src/utils.mjs | |||
@@ -113,6 +113,7 @@ export function debounce (func, delay = 1000) { | |||
113 | * @param {HTMLElement} element | 113 | * @param {HTMLElement} element |
114 | */ | 114 | */ |
115 | export const shiftByWindow = element => { | 115 | export const shiftByWindow = element => { |
116 | delete element.style.transform | ||
116 | const rect = element.getBoundingClientRect() | 117 | const rect = element.getBoundingClientRect() |
117 | const offsetX = window.innerWidth - rect.left - rect.width | 118 | const offsetX = window.innerWidth - rect.left - rect.width |
118 | const offsetY = window.innerHeight - rect.top - rect.height | 119 | const offsetY = window.innerHeight - rect.top - rect.height |