-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
圖片預覽位置亂跳 #120
Comments
#40 與 #55 初步闡述了該問題發生的原理。以下對其進一步分析。 #55 指出該問題位於函式 PttChrome/src/components/ImagePreviewer.js Lines 80 to 92 in 7f2d668
(相關的參數 目前的圖片位置邏輯是:
#40 提到,目前的計算方式 (實際上是 雖然我不是邏輯學家,但這看起來很複雜對吧? 它的理念是讓圖片中心橫軸對齊游標,但以不超出頁緣減 20 CSS 像素的界線爲前提。 const getTop = (top, height) => {
const pageHeight = $(window).height();
height = min(0.8 * pageHeight, height); // 可能有些許誤差,先暫時忽略
return max(20, min(pageHeight - 20 - height, top - height / 2));
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如圖所示,正確的顯示方式(PttChrome):
https://imgur.com/4Glkgkp
異常(term.ptt.cc):
https://imgur.com/zDhx9wI
可看到最下面那張圖片的預覽窗格跳到上方的邊界之外了
(範例來源: #1ZK1c_RV (MobileComm) [ptt.cc] [討論] 安卓手機APP各種BUG)
經測試,只在按下F11的全螢幕模式下才會有此bug,一般模式則似乎正常
--
10/23補充:經再次確認,一般模式位置亦會亂跳,不限全螢幕模式
The text was updated successfully, but these errors were encountered: