From 5204fc6521c2c4067e1744fd6df39e8730e4ad5d Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 19 Feb 2012 15:18:21 +0000 Subject: [PATCH] on page load w/o find, forget previous find (making just removing find and reloading work as expected) ... fixes #207 --- static/js/pandora/URL.js | 6 ++++++ static/js/pandora/home.padma.js | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index deb9c0d4..671117e7 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -126,6 +126,12 @@ pandora.URL = (function() { if (!state.item) { set.find = state.find; } + } else { + if (!pandora.$ui.appPanel) { + // on page load without find, clear find, so that + // removing query and reloading works as expected + set.find = pandora.site.user.ui.find; + } } Ox.Request.cancel(); diff --git a/static/js/pandora/home.padma.js b/static/js/pandora/home.padma.js index a7ebbced..fde81651 100644 --- a/static/js/pandora/home.padma.js +++ b/static/js/pandora/home.padma.js @@ -379,7 +379,8 @@ pandora.ui.home = function() { scrollToPosition(position - 1, true); }, mouserepeat: function() { - if (counter++ % 10 == 0) { + // fixme: arbitrary + if (counter++ % 5 == 0) { scrollToPosition(position - 1, false); } } @@ -403,9 +404,8 @@ pandora.ui.home = function() { scrollToPosition(position + 1, true); }, mouserepeat: function() { - Ox.print('---------------------------') - if (counter++ % 10 == 0) { - Ox.print('YES') + // fixme: arbitrary + if (counter++ % 5 == 0) { scrollToPosition(position + 1, false); } } @@ -427,7 +427,8 @@ pandora.ui.home = function() { }); }, mousewheel: function(e, delta, deltaX, deltaY) { - Ox.print('mwd', deltaX) + Ox.print('mwd', deltaX); + // fixme: arbitrary scrollToPosition(position + Math.round(deltaX * 2), true); } });