Fixing zoom in graphs for Firefox 3.0.18
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
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.
(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
Buchan Milne <bgmilne at staff.telkomsa.net> 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.
On Wed, 07 Apr 2010 13:21:01 +0200, Kristian Nielsen <knielsen at knielsen-hq.org> wrote:
Buchan Milne <bgmilne at staff.telkomsa.net> 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.
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
is your trouble corrected by this : http://www.hswn.dk/hobbiton/2009/11/msg00090.html ?
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
participants (4)
-
bgmilne@staff.telkomsa.net
-
doctor@makelofine.org
-
knielsen@knielsen-hq.org
-
malcolm.hunter@gmx.co.uk