diff --git a/pages/CSS/overflow/overflow-visible-event.uvue b/pages/CSS/overflow/overflow-visible-event.uvue index 420ee896f28ba5293cdfa8b8d024726a36cdc024..9a26482cf87d82b6b74ee88547122405a615aa94 100644 --- a/pages/CSS/overflow/overflow-visible-event.uvue +++ b/pages/CSS/overflow/overflow-visible-event.uvue @@ -101,26 +101,25 @@ const rect = uni.getElementById('child')?.getBoundingClientRect() if (rect != null) { let ratio = 1 - if (uni.getSystemInfoSync().platform == 'android'){ ratio = uni.getSystemInfoSync().devicePixelRatio } const systemInfo = uni.getSystemInfoSync() const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight this.jest_click_x = rect.x * ratio + 30 - this.jest_click_y = (rect.bottom + titleBarHeight - 40) * ratio + this.jest_click_y = rect.bottom * ratio - 30 } }, jest_getParentRect() { - const transform = uni.getElementById('parent')?.style.getPropertyValue("transform") + const transform = uni.getElementById('parent')?.style.getPropertyValue("transform") if (transform != null) { - let value = transform as string + let value = transform as string value = value.split(",")[1].slice(0, -3) let ratio = 1 if (uni.getSystemInfoSync().platform == 'android'){ ratio = uni.getSystemInfoSync().devicePixelRatio } - this.jest_parent_top = Math.round((parseFloat(value) * ratio)) + this.jest_parent_top = Math.round((parseFloat(value) * ratio)) } }, jest_getAbsoluteViewRect() { @@ -133,7 +132,7 @@ ratio = uni.getSystemInfoSync().devicePixelRatio } this.jest_click_x = rect.x * ratio + 30 - this.jest_click_y = (rect.top + titleBarHeight + 30) * ratio + this.jest_click_y = (rect.top + titleBarHeight) * ratio + 30 } }, jest_scrollToDeepOverflow() { @@ -151,7 +150,7 @@ const afterRect = uni.getElementById('deep-overflow')?.getBoundingClientRect() if (afterRect != null) { this.jest_click_x = afterRect.x * ratio + 30 - this.jest_click_y = (afterRect.top + titleBarHeight + 30) * ratio + this.jest_click_y = (afterRect.top + titleBarHeight) * ratio + 30 } }, 200) }