Both Netscape 7 and Internet Explorer 5/6 do an automatic scroll (both horizontal and vertical) when an element extends past the canvas (viewable rendered space) rightmost width and bottom height. Mouse-guided images do that as the viewer moves the mouse close to these limits. This causes the entire canvas to shift when viewed on DOM2 browsers. In order to minimize this, the following script code was added to get the canvas limits and use them as a clipping window before displaying an image. If an image was outside these limits then the style sheet display property was set to "none" (meaning do not display nor allocate space for this element); otherwise it was set to "inline" (meaning to allocate space for this element.)
Following is the script function to determine the canvas dimensions:
Following is a script scrap that tests the image coordinates against the clipping limits:
YAMF - "Yet Another Mouse Follower"
All Is Not What It Seems
Netscape 6 Made Me Do It!
Testing - To Reload or To Restart?
Browser Sniffing - Parse or Presence?
Stopping Annoying Auto-Scroll in DOM2 Browsers
Netscape 6 is Pixel Picky
Inline Style Constraint on Internet Explorer 5
Must Use <LAYER> tag in Netscape 4 to perform DHTML
!DOCTYPE Compliance Mode
Take Care Not to Render in <HEAD> Section
Automatic Expansion of Relative URLs
The Elusive Netscape 4 Layer Elements
Temperamental onLoad After Reload
document.images[id].complete Property Dependency
Search Method Does Not Return Boolean Value
Regular Expression Global Flag Fails With Subsequent Usage
Roll Your Own
|Copyright © 2002-2003, ProjectIt, All Rights Reserved