No question, merely a statement. I did not set the width or height on the image at all, only the URL.
GWT assigns a width and height the first time it reads the image in via the URL. Then the width and height values apparently get cached and linked to the URL of the image. Irregardless if the image at the URL is replaced with a new one of a different size the originial width and height appear permanently. Re- compiling has no effect. The only work around I figured out was to remove the width and height attributes via the DOM. I haven't tried to specifically set the width and height to "100%", I would prefer not to have to do this. Also, it is not required to set width and height to 100% in pure HTML so why should it be in GWT? This does not seem like the appropriate way for GWT to handle this, so I stated the issue and a work around. On Oct 16, 9:54 am, rakesh wagh <[EMAIL PROTECTED]> wrote: > So what is your question? > > If you fix a width like "200px" etc for a image widget, any image > loaded inside it will resize itself to that dimension. In order to get > away from that, assign either "100%" or blank string "" or any thing > that is not a width. And the browser will ignore it. > > Rakesh Wagh > > On Oct 15, 9:16 am, "David E." <[EMAIL PROTECTED]> wrote: > > > > > I was having problems with "old" images maintaing their width and > > height attributes when replaced with new images with the same url. > > i.e. the image at the url is replaced with a different image. > > > Unfortunately, the option of changing the image file name to force new > > values for width and height was not an option in my case. > > > While researching a solution, I discovered that if I add the following > > lines to remove the width and height attributes which are never > > updated when the image at the url are changed, the image is resized > > appropriately both in hosted and web mode. I am using GWT 1.4.61 > > > DOM.removeAttribute(image.getElement(), "width"); > > DOM.removeAttribute(image.getElement(), "height");- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
