Closed Bug 35882 Opened 25 years ago Closed 24 years ago

scaling an image in a tight loop for DHTML animation causes reload of image

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: amp, Assigned: jst)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; N; Win98; en-US) Mozilla/m13 BuildID: 2000022820 I have some sever problems with a javascript that performs some DHTML > animation that involves image scaleing, but it works in IE just > hunkey-dorey. Works in M14 and NS6p1 also, but you get the "load box" > around the image whenever it is scaled =( Is there (a) a way to turn this > off when you are only stretching and image and not technically re-loading it > ? Or is there a reason the the graphics engine needs to reload the image? > Basically, on screen re-draw I dont see why it should need to re-fetch the > image. > > To see what I'm talking about look at > http://andysgi.rit.edu/aw2/mirkwood/mirknav.html > > In IE, the balls spin smooth and without difficulty. I can happily adjust > the DOM references to spin them in a more precicse browser (yay!) but the > animation fails when you scale images -- > > Relevant portions of the code look like this: > > if (document.getElementById) { > elem = document.getElementById(layer); > elem.style.left=xstop; > elem.style.top=ystop; > > if(layer == 'Fred') { > > picture_elem1.width = -(width); > picture_elem1.height = -(height); > > } > > where layer is a name reference to an ID on the page, width and height are > numerical values (they are positive, I am passig neg values and switching to pos ones). the left and top work fine, and the balls rotate, however > the scaling of the images produces borders all around the balls, for a > reason that I cannot explain. I realize this is a dev newsgroup and my > issue is not so much in debugging this particular piece of code as it is in > hoping this is an engine bug and can be fixed such that scaled image DHTML > stuff is possible. > A second URL with the same problem that is less JS code to look at is at http://andysgi.rit.edu/aw2/mirkwood/dhtml6.html just press the red button. This is much easier to detect on dark backgrounds, but is does it no matter what the color. > -Andy > > Andrew Phelps > Rochester Institute of Tech. > amp@it.rit.edu Reproducible: Always Steps to Reproduce: 1.Create Div with image 2.Animate div using javascript to change left and top 3.Place in the animation sequence something to change the width and height of the image in the div. 4. watch it work entirely correctly except it reloades the image over and over. This is much easier to see with dark BG colors. Actual Results: You watch it animate and scale correctly, but with load boxes around the image. Expected Results: Animate and scale correctly but just stretch the image without the white borders. plz see above of same JS code. Basically whenever you repeatedly change the h/w of an image you can see the visible flicker of the load. Such is not the case in that unmentionable MS browser, which seems to simple stretch the image and update the graphics on screen. Oh, also reproduceable on Win95 and IRIX using M14
amp@it.rit.edu - these URLS now 404. Can you provide alternatives? Gerv
Marking INVALID - URLs 404. Gerv
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Mass update of qa contact
QA Contact: gerardok → janc
verified 2000-09-15-08-M18
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.