Xymon Mailing List Archive search

Fixing zoom in graphs for Firefox 3.0.18

5 messages in this thread

list Kristian Nielsen · Wed, 07 Apr 2010 10:26:54 +0200 ·
Hi,

For a long time I was unable to use the nifty zoom feature in the Hobbit/XYMon
graphs. The problem is that dragging the mouse invokes the browser image
drag-and-drop functionality, preventing the zoom.js machinery to do its work.

(So this is a different problem from what I read about in several threads,
with people getting a blue box instead of a working zoom image).

Today I finally decided to look into the problem, and found a fix. I though I
would post it, in case it should be helpful to others.

Basically, it's this one-line patch:

--- /etc/hobbit/web/zoom.js     2010/04/07 08:03:39     1.1
+++ /etc/hobbit/web/zoom.js     2010/04/07 08:06:10
@@ -550,6 +550,7 @@
    gMouseObj.dragging = true;
    gMouseObj.saveCurrentToStartPosition();
    gZoomGraphObj.drawSelection(gMouseObj.currentX, gMouseObj.currentY, gMouseObj.currentX, gMouseObj.currentY);
+   if (e.preventDefault) e.preventDefault();
   } else if (gMouseObj.rightButtonPressed()) {
    var test = true;
   }

I'm using hobbit 4.2.0 (and Firefox 3.0.18), so this is old stuff ... my
apologies if this is already fixed in a newer version.

Hope this helps,

 - Kristian
list Buchan Milne · Wed, 7 Apr 2010 11:52:17 +0100 ·
quoted from Kristian Nielsen
On Wednesday, 7 April 2010 09:26:54 Kristian Nielsen wrote:
Hi,

For a long time I was unable to use the nifty zoom feature in the
 Hobbit/XYMon graphs. The problem is that dragging the mouse invokes the
 browser image drag-and-drop functionality, preventing the zoom.js
 machinery to do its work.
I've never seen this myself, on various browsers (I'm currently using firefox 
3.5, chromium 5, konqueror from KDE 4.3.x, IE 7).

Are you starting your drag when the cursor is a pointer, and not a cross ? 
Shouldn't you just start your drag from inside the graph boundaries/axes 
(instead of over random parts of the image outside the graph boundaries)?

I guess if many people have this problem, it is worth fixing, but ... I've 
never had any new users to Xymon ask this.
quoted from Kristian Nielsen
(So this is a different problem from what I read about in several threads,
with people getting a blue box instead of a working zoom image).

Today I finally decided to look into the problem, and found a fix. I though
 I would post it, in case it should be helpful to others.

Basically, it's this one-line patch:

--- /etc/hobbit/web/zoom.js     2010/04/07 08:03:39     1.1
+++ /etc/hobbit/web/zoom.js     2010/04/07 08:06:10
@@ -550,6 +550,7 @@
    gMouseObj.dragging = true;
    gMouseObj.saveCurrentToStartPosition();
    gZoomGraphObj.drawSelection(gMouseObj.currentX, gMouseObj.currentY,
 gMouseObj.currentX, gMouseObj.currentY); +   if (e.preventDefault)
 e.preventDefault();
   } else if (gMouseObj.rightButtonPressed()) {
    var test = true;
   }

I'm using hobbit 4.2.0 (and Firefox 3.0.18), so this is old stuff ... my
apologies if this is already fixed in a newer version.
Regards,
Buchan
list Kristian Nielsen · Wed, 07 Apr 2010 13:21:01 +0200 ·
quoted from Buchan Milne
Buchan Milne <user-9b139aff4dec@xymon.invalid> writes:
Are you starting your drag when the cursor is a pointer, and not a cross ? 
Shouldn't you just start your drag from inside the graph boundaries/axes 
(instead of over random parts of the image outside the graph boundaries)?
Ok, seems the real problem is that my cursor never becomes a cross, it stays a
pointer when moving over the graph.

I did not realise this was how it is supposed to work until you explained
it :-) As I never saw the cross appear.

Eg. the graphs in http://xymon.org/ are working fine in my browser.
quoted from Buchan Milne
I guess if many people have this problem, it is worth fixing, but ... I've 
never had any new users to Xymon ask this.
Indeed, I also found it strange that noone else were having this issue.

I am using the Hobbit packaged in Ubuntu 8.04 (on two different
systems). Maybe the problem is with the Ubuntu package rather than with Hobbit
/ XYMon. Or it's just been fixed in newer versions of XYMon.

Either way, probably not something that needs any further fixing.

Thanks,

 - Kristian.
list dOCtoR MADneSs · Wed, 07 Apr 2010 15:23:55 +0200 ·
On Wed, 07 Apr 2010 13:21:01 +0200, Kristian Nielsen
quoted from Kristian Nielsen
<user-bc00a861a9ff@xymon.invalid> wrote:
Buchan Milne <user-9b139aff4dec@xymon.invalid> writes:
Are you starting your drag when the cursor is a pointer, and not a
cross
?
Shouldn't you just start your drag from inside the graph
boundaries/axes 
(instead of over random parts of the image outside the graph
boundaries)?
Ok, seems the real problem is that my cursor never becomes a cross, it
stays a
pointer when moving over the graph.

I did not realise this was how it is supposed to work until you
explained
it :-) As I never saw the cross appear.

Eg. the graphs in http://xymon.org/ are working fine in my browser.
I guess if many people have this problem, it is worth fixing, but ...
I've
never had any new users to Xymon ask this.
Indeed, I also found it strange that noone else were having this issue.

I am using the Hobbit packaged in Ubuntu 8.04 (on two different
systems). Maybe the problem is with the Ubuntu package rather than with
Hobbit
/ XYMon. Or it's just been fixed in newer versions of XYMon.

Either way, probably not something that needs any further fixing.

Thanks,

 - Kristian.

is your trouble corrected by this :
http://www.hswn.dk/hobbiton/2009/11/msg00090.html ?
list Malcolm Hunter · Wed, 07 Apr 2010 15:37:46 +0200 ·
is your trouble corrected by this :
http://www.hswn.dk/hobbiton/2009/11/msg00090.html ?
That relates to the "blue rectangle" bug which is different to the problem the OP reported.

Malcolm


-- 
Technical copy-editor & proofreader

KDE Proofreading Team
KDE British English Translation Team

http://l10n.kde.org/team-infos.php?teamcode=en_GB

Facebook: http://www.facebook.com/FriendlyAtheist

"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail