PDA

View Full Version : Chart in Portlet dissapears in IE6 after drop



twk3
30 Jan 2010, 12:48 PM
Ext JS 3.1

I've got a chart in a portlet. After dropping the portlet somewhere, the chart is gone until I click on the area where it should have been. The portlet is a static size and does not resize during the drop. (if resize is called, this problem doesn't occur)

I've been using Observable.capture on the portlet and the chart. When I drop in firefox, Portlet fires removed, added. And the chart fires initialized, beforerefresh, refresh

In IE6 I still see the portlet removed, and added, but no events fired from the chart.

On added for the portlet, I decided to call a doLayout, but that doesn't work, because canLayout is returning false. I also put a listener on the afterlayout of the portalColumn, which does fire after the portlet is added. But in that listener the canLayout for the portlet is also false.

As a result, afterlayout is never fired for the portlet in IE6 after it has been added.

Anybody know what I can listen for to cause the chart to refresh at the right time? Everything I've tried has caused it to get a size of 0 0

I've forced layout in doLayout, which results in afterlayout being called all the way down, but the layout is all wrong.

30 Jan 2010, 1:38 PM
Strange. IE6 sucks. Try using debugbar or fiddler and see if the flash DOM element is still even there.

twk3
31 Jan 2010, 12:01 AM
Aye it's still there, I can still see the top left corner of it. And if I right click in the area it should show up I get the Adobe Flash right click menu... and the chart corrects itself.

One thing I have noticed, while debugging is that some sort of flash event is being fired. The FlashEventProxy, in some toXML event function, it's a resize event, and the width and height are 0

These are obviously events that are on the flash object, so I can't get them by using capture on the Chart Component. On Monday maybe I'll try to find a way to see all the events being fired from from/to the flash.

At the moment, my best guess is that this resize should either, not be happening, or it should be later, after the Ext component sizes are properly assigned.

twk3
1 Feb 2010, 11:50 AM
Here's a simple example of how it breaks: http://twkie.net/example/IEChartTest/

I see there is a resize call going on, but the size isn't changing so all the params are undefined.

In bodyresize the padding changed by about 10px, so there is a width change. But everything else is undefined.

EDIT: I ran it in Ext 3.0.3 and it doesn't have the same problem. A resize event is fired on the Flash Component.

twk3
1 Feb 2010, 3:18 PM
My current workaround is to set the width of the chart to 100% whenever the portlet is 'added'.

Because cacheSizes is turned on, the resize event doesn't happen more than once, but the problem is still gone. Not sure how that works.

If I set the width to something other than a percent value the solution does NOT work so this isn't a solution for all charts.

EDIT: workaround didn't even actually work for my app, in which I've fixed that padding issue with the columns having different padding, as a result the resize isn't being fired on the portlet, and this isn't working.

twk3
2 Feb 2010, 10:09 AM
I've updated the testcase page to Ext 3.1.1-rc, and made both columns the same size so that there is no resize.

http://twkie.net/example/IEChartTest/

Adding bug report: http://www.extjs.com/forum/showthread.php?t=91151