multiscroll 
| resources: | Home Mailing List Installation Source Code Members Bugs Screenshots |
|---|
What's New
- Paged panning!
- Markers now killable
- Internal redesign
- mozdev.org
Other Stuff
- mozscroll
- autoscroll
- PageRank booster for my website!
The project content goes here.
Multiscroll for Mozilla and Phoenix by Ed Catmur
Tested on Mozilla 1.4a and Phoenix 0.5, will not work on earlier versions!
Acknowledgements - skidooer for Autoscroll code, Jens Tinz for prefs code, Erik Arvidsson and Matthew Ratzloff for overlay code, many more people
This is not mozscroll, which is written in native code. Multiscroll uses javascript, chrome and xpi as these make for a far faster development cycle - witness this project is pretty much finished already. Still, when Brian gets Mozscroll finished I'm sure it will be a better result; I fully support his effort (and hope he may see fit to use some of my code if it's at all appropriate!).
After fixing autoscroll for the recent DOM changes, I got hooked and decided to go and implement RFE 22775 and RFE 133054 - click & drag and panning support.
Note: this is built on and duplicates the functionality of autoscroll - don't have both installed!
How to use it:
- Middle click (press and release the middle button) to get into autoscroll mode - similar to autoscroll, an anchor appears at the origin, the mouse pointer changes to an arrow, and moving the mouse causes the page to scroll at a rate proportional to the displacement from the origin; click the middle button again to exit.
- Middle click and then press the left button to get into pan mode - the autoscroll anchor disappears, a pair of boxes appears (the larger box represents the document and the smaller box the browser window), the mouse pointer changes to a crosshair, and dragging the mouse (with the left button held down) moves the browser window around in the document; release the left button to exit.
- Middle click and then press the right button to get into drag mode - the autoscroll anchor changes to a hand, the mouse pointer changes to a pointing hand, and moving the mouse causes the page to be displaced by an amount proportional to the displacement of the mouse from the origin; release the right button to exit.
We now have a prefs panel - screenshot shows v0.0.1
The behaviours above are expressly designed to be compatible with RadialContext running on the middle mouse button, as long as it's set to wait for a drag action before activating the menu.
Also, multiscroll ignores activation on link elements, so you can still middle click on a link to get it to open in a new tab (or window).
Notes: prefs.js/prefs panel preferences: - actionExponent[]: SCROLL, DRAG * set to 1 for linear scrolling, higher for logarithmic scrolling * on the DRAG tool the logarithmic aspect is relative to each individual mouse motion, not to the overall displacement - actionMultiplier[]: SCROLL, DRAG * 0.2 is recommended for SCROLL, 1 for DRAG * you can also use negative values - actionSize[]: maximum minimum dimension of PAN document box - actionAppearance[]: PAN only * WIREFRAME is clean and fast * TEXTURED is prettier but is jerky on machines without a fast GPU * THUMBNAIL takes roughly 200msGHz/KB to generate, so by Moore's Law it should be usable in 6 years or so. Set panThumbnailPreload = true to speed up the generation at the expense of document load and window resize taking ages - if someone could work out how to speed this up that'd be brilliant!
In settings.js: advanced user-settable preferences
Multiscroll.Event.prototype.panThumbnailPreload = false;
Multiscroll.Event.prototype.dragRadius = 10;
Multiscroll.Tool.Scroll.prototype.image = {
all : "chrome://multiscroll/content/autoscroll_all.png",
vertical : "chrome://multiscroll/content/autoscroll_v.png",
horizontal : "chrome://multiscroll/content/autoscroll_h.png"
};
Multiscroll.Tool.Pan.prototype.image = {
screen : "chrome://multiscroll/content/screen.png",
docBody : "chrome://multiscroll/content/docBody.png",
docCorner : "chrome://multiscroll/content/docCorner.png"
};
Multiscroll.Tool.Drag.prototype.image = "chrome://multiscroll/content/hand.png";
Multiscroll.Tool.Scroll.prototype.cursor = {
all : "move",
vertical : "n-resize",
horizontal : "e-resize"
};
Multiscroll.Tool.Pan.prototype.cursor = "crosshair";
Multiscroll.Tool.Drag.prototype.cursor = "pointer";