PDA

View Full Version : boxCompoment automaticly set height/width after 3.0 ?



franck34
3 Jan 2010, 9:16 AM
Hello, i'm trying to migrate Ext.ux.IconAlive into ExtJS 3.1

(i missed the migration for Ext 3.0 too)

Everything is working perfectly with a version < 3.0 but not using > 3.0


I can see using firebug that the style attribute "width" appear in my container between 2.2 and 3.0.

Got an idea to fixe that ?

Here is a screenshot with 3.1 (same for 3.0) :
http://innovacode.com/extjs/Ext.ux.IconAlive-ext-3.1.0/iconalive31.gif

And the good one with 2.2 :

http://innovacode.com/extjs/Ext.ux.IconAlive-ext-2.2/iconalive22.gif



Ext.ux source code :
http://innovacode.com/extjs/Ext.ux.IconAlive-ext-3.1.0/Ext.ux.IconAlive.js

Sample:
http://innovacode.com/extjs/Ext.ux.IconAlive-ext-3.1.0/sample.js

CSS:
http://innovacode.com/extjs/Ext.ux.IconAlive-ext-3.1.0/icons.css


Any help will be really appreciated, it's too deeper in extjs code for me !


Cheers,
Franck

franck34
3 Jan 2010, 6:52 PM
up

franck34
4 Jan 2010, 3:39 AM
help :((

franck34
4 Jan 2010, 9:45 AM
nobody know ??? seriously ?

franck34
4 Jan 2010, 11:33 PM
I'm not a wife.

I'm not in a house.

But i'm desesperate

:((:((:((

Animal
5 Jan 2010, 2:18 AM
What layout manager are you asking that Window to use to size those child Components?

Animal
5 Jan 2010, 2:20 AM
From the 3rd to the 5th, have you done anything to investigate other than post here?

franck34
5 Jan 2010, 2:24 AM
Well, i've tried to diff boxComponent extjs source code but there is too many changes (simple diff is unusuable and i don't have svn access)

Here is the interesting part of the code :


Ext.ux.IconAlive = Ext.extend(Ext.BoxComponent, {
selected : false,
tooltipType : 'qtip',
clsOver:'big-icon-over',
clsSelected:'big-icon-selected',
isIconAlive:true,

onRender : function(ct, position){
if(!this.template){
if(!Ext.ux.IconAlive.iconTemplate){
// hideous table template
Ext.ux.IconAlive.iconTemplate = new Ext.Template(
'<div class="big-icon-wrap">',
'<div class="big-icon"><img src="{1}"/></div>',
'<table class="big-icon-title"><tbody><tr><td><span>{0}</span></td></tr></tbody></table>',
'</div>');
}
this.template = Ext.ux.IconAlive.iconTemplate;
}
var icon, targs = [this.title || ' ', this.src];
icon = this.template.append(ct, targs, true);

this.initIcon(icon);
Ext.ux.IconAlive.superclass.onRender.apply(this, arguments);
},
[....]

When rendered, with extjs < 3.0,


<div class="big-icon-wrap">

With extjs > 3.0


<div class="big-icon-wrap" style="height:XXX;width:XXX">

franck34
5 Jan 2010, 2:27 AM
Perhaps i must take a look to changed in templates but i doubt

Animal
5 Jan 2010, 2:42 AM
You put those BoxComponents into a Window.

What layout manager are you asking the Window to use to render and size all those child BoxComponents?

franck34
5 Jan 2010, 2:45 AM
Good question. The idea of this extension is to put icons in a panel or a window.

For a window, i'm using layout:'fit'

For a panel, i'm using layout:'fit' too

franck34
5 Jan 2010, 3:13 AM
Ho my god.

Fixed by removing layout parameter from panels and windows ...


thanks for help animal, i was far away to think of that, didn't code using extjs since one year :(

Animal
5 Jan 2010, 3:17 AM
You have to write what you mean.

Write code that you understand.

franck34
5 Jan 2010, 3:22 AM
Last year i was understanding.

Need some time to retreive my brain for extjs ;)

thanks again