]> git.wh0rd.org - tt-rss.git/commitdiff
grabber offset storage fixes
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 May 2008 04:08:36 +0000 (05:08 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 May 2008 04:08:36 +0000 (05:08 +0100)
feedlist.js
tt-rss.js

index ada279ec267d9deb2e6b17f9bc8a3ab89c5d5429..cf41f3ba13902d0b2d3112ce2cbb202ba6173285 100644 (file)
@@ -478,7 +478,8 @@ function mouse_move_handler(e) {
                        client_y = window.event.clientY;
                        client_x = window.event.clientX;
                } else if (e) {
-
+                       client_x = e.screenX;
+                       client_y = e.screenY;
                }
 
                if (mouse_is_down) {
index 61598a99b0048f6d443d7e952fe3be2f2f6fc023..68c43e4049669f6a85edf2a0061a3cf2bb435fa9 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -359,7 +359,7 @@ function init() {
 
 function resize_headlines(delta_x, delta_y) {
 
-       debug("resize_headlines: " + hor_offset + ":" + ver_offset);
+       debug("resize_headlines: " + delta_x + ":" + delta_y);
 
        var h_frame = document.getElementById("headlines-frame");
        var c_frame = document.getElementById("content-frame");
@@ -450,7 +450,6 @@ function init_second_stage() {
                delCookie("ttrss_vf_test");
 
 //             document.onresize = resize_headlines;
-               resize_headlines();
 
                var toolbar = document.forms["main_toolbar_form"];
 
@@ -466,10 +465,12 @@ function init_second_stage() {
 
                loading_set_progress(60);
 
-               ver_offset = getCookie("ttrss_offset_ver");
+               ver_offset = parseInt(getCookie("ttrss_offset_ver"));
+               hor_offset = parseInt(getCookie("ttrss_offset_hor"));
+
+               debug("offsets from cookies [x:y]: " + hor_offset + ":" + ver_offset);
 
-               if (!ver_offset || ver_offset == undefined || ver_offset == 'undefined') ver_offset = 0;
-               if (!hor_offset || hor_offset == undefined || hor_offset == 'undefined') hor_offset = 0;
+               resize_headlines();
 
        } catch (e) {
                exception_error("init_second_stage", e);