]> git.wh0rd.org Git - tt-rss.git/commitdiff
grabber: remove direct link between panel offset and mouse coordinate delta
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 May 2008 05:14:55 +0000 (06:14 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 May 2008 05:14:55 +0000 (06:14 +0100)
feedlist.js
tt-rss.js

index cf41f3ba13902d0b2d3112ce2cbb202ba6173285..f7699efbe5ae832be0f2fbbe6d8c96537c66b453 100644 (file)
@@ -488,6 +488,10 @@ function mouse_move_handler(e) {
                        if (mouse_x == 0) mouse_x = client_x;
 
                        resize_headlines(mouse_x - client_x, mouse_y - client_y);
+
+                       mouse_y = client_y;
+                       mouse_x = client_x;
+
                        return false;
                }
 
@@ -502,7 +506,11 @@ function resize_enabled(b) {
 
 function mouse_down_handler(e) {
        try {
-               if (enable_resize) mouse_is_down = true;
+               if (enable_resize) { 
+                       mouse_is_down = true;
+                       mouse_x = 0;
+                       mouse_y = 0;
+               }
        } catch (e) {
                exception_error("mouse_move_handler", e);
        }
index 68c43e4049669f6a85edf2a0061a3cf2bb435fa9..fe5f170c55285193935aa6522514fd6f2802a182 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -377,7 +377,7 @@ function resize_headlines(delta_x, delta_y) {
 
                if (c_frame.offsetLeft > feeds_frame.offsetWidth + feeds_frame.offsetLeft + 100) {
                        if (delta_x != undefined) {
-                               hor_offset = delta_x;
+                               hor_offset = hor_offset + delta_x;
                        }
                }
 
@@ -394,7 +394,7 @@ function resize_headlines(delta_x, delta_y) {
        } else {
 
                if (delta_y != undefined) {
-                       ver_offset = delta_y;
+                       ver_offset = ver_offset + delta_y;
                }
 
                debug("resize_headlines: VER-mode");