From dd302fade4988d2adbad0b548dbc3c3996e2e2fe Mon Sep 17 00:00:00 2001 From: Jordan Bates Date: Sun, 5 May 2013 22:37:49 -0700 Subject: [PATCH] Fix QR dragging without fixed header --- CHANGELOG.md | 3 +++ builds/4chan-X.js | 2 +- builds/4chan-X.user.js | 2 +- builds/crx/script.js | 2 +- src/General/UI.coffee | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ebce0a1d..ad6692e05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ detharonil MayhemYDG: - Fix whitespaces not being preserved in code tags in /g/. +seaweedchan: +- Fix QR not being able to drag to the top with fixed header disabled + zixaphir: - Fix custom CSS diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 58097eed0..17a48ec35 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -2454,7 +2454,7 @@ screenWidth: screenWidth, isTouching: isTouching }; - _ref = Conf['Header auto-hide'] ? [0, 0] : Conf['Bottom Header'] ? [0, Header.bar.getBoundingClientRect().height] : [Header.bar.getBoundingClientRect().height, 0], o.topBorder = _ref[0], o.bottomBorder = _ref[1]; + _ref = Conf['Header auto-hide'] || !Conf['Fixed Header'] ? [0, 0] : Conf['Bottom Header'] ? [0, Header.bar.getBoundingClientRect().height] : [Header.bar.getBoundingClientRect().height, 0], o.topBorder = _ref[0], o.bottomBorder = _ref[1]; if (isTouching) { o.identifier = e.identifier; o.move = touchmove.bind(o); diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index b71a3da7e..eae56df2e 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -2450,7 +2450,7 @@ screenWidth: screenWidth, isTouching: isTouching }; - _ref = Conf['Header auto-hide'] ? [0, 0] : Conf['Bottom Header'] ? [0, Header.bar.getBoundingClientRect().height] : [Header.bar.getBoundingClientRect().height, 0], o.topBorder = _ref[0], o.bottomBorder = _ref[1]; + _ref = Conf['Header auto-hide'] || !Conf['Fixed Header'] ? [0, 0] : Conf['Bottom Header'] ? [0, Header.bar.getBoundingClientRect().height] : [Header.bar.getBoundingClientRect().height, 0], o.topBorder = _ref[0], o.bottomBorder = _ref[1]; if (isTouching) { o.identifier = e.identifier; o.move = touchmove.bind(o); diff --git a/builds/crx/script.js b/builds/crx/script.js index c4a74b303..c9c0316a9 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -2453,7 +2453,7 @@ screenWidth: screenWidth, isTouching: isTouching }; - _ref = Conf['Header auto-hide'] ? [0, 0] : Conf['Bottom Header'] ? [0, Header.bar.getBoundingClientRect().height] : [Header.bar.getBoundingClientRect().height, 0], o.topBorder = _ref[0], o.bottomBorder = _ref[1]; + _ref = Conf['Header auto-hide'] || !Conf['Fixed Header'] ? [0, 0] : Conf['Bottom Header'] ? [0, Header.bar.getBoundingClientRect().height] : [Header.bar.getBoundingClientRect().height, 0], o.topBorder = _ref[0], o.bottomBorder = _ref[1]; if (isTouching) { o.identifier = e.identifier; o.move = touchmove.bind(o); diff --git a/src/General/UI.coffee b/src/General/UI.coffee index aab109ead..4c5c469e3 100644 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -226,7 +226,7 @@ UI = do -> isTouching: isTouching } - [o.topBorder, o.bottomBorder] = if Conf['Header auto-hide'] + [o.topBorder, o.bottomBorder] = if Conf['Header auto-hide'] or not Conf['Fixed Header'] [0, 0] else if Conf['Bottom Header'] [0, Header.bar.getBoundingClientRect().height]