PDA

View Full Version : [FIXED] TypeError: tab.getActualRotation is not a function



spatel.engg
5 Jun 2014, 3:36 AM
Hello,

I am getting javascript error while using tabBar property of tabpanel.

Please check fiddle.
https://fiddle.sencha.com/fiddle/6cn/preview

Thanks,
Sunil Patel

evant
5 Jun 2014, 3:44 AM
Thanks for the report! I have opened a bug in our bug tracker.

spatel.engg
5 Jun 2014, 9:53 PM
when 5.0.1 will be available for download? and till then what should be workaround for same?

bob4ever
5 Jun 2014, 11:51 PM
Don't expect it before the next 3 months ;-).

gtdev
6 Jun 2014, 7:07 AM
Here is my fix for the same bug:



Ext.override(Ext.tab.Bar, {
adjustTabPositions: function () {
var items = this.items.items,
i = items.length,
tab, lastBox, el, rotation;
// When tabs are rotated vertically we don't have a reliable way to position
// them using CSS in modern browsers. This is because of the way transform-orign
// works - it requires the width to be known, and the width is not known in css.
// Consequently we have to make an adjustment to the tab's position in these browsers.
// This is similar to what we do in Ext.panel.Header#adjustTitlePosition
if (!Ext.isIE8) {
while (i--) {
tab = items[i];

/*FIX START*/

if (!tab.isTab)
continue;

/*FIX END*/

el = tab.el;
lastBox = tab.lastBox;
rotation = tab.getActualRotation();
if (rotation === 1 && tab.isVisible()) {
// rotated 90 degrees using the top left corner as the axis.
// tabs need to be shifted to the right by their width
el.setStyle('left', (lastBox.x + lastBox.width) + 'px');
} else if (rotation === 2 && tab.isVisible()) {
// rotated 270 degrees using the bottom right corner as the axis.
// tabs need to be shifted down by their height
el.setStyle('left', (lastBox.x - lastBox.height) + 'px');
}
}
}
}
});

spatel.engg
8 Jun 2014, 10:13 PM
Thanks for fix.

This is working fine as long as tabpanel is consumed directly but when tab panel is extended then this again stops working.

Please find my scenario here: https://fiddle.sencha.com/fiddle/6fq/preview

Please update on this.

Thanks,
Sunil Patel

amistry
25 Jun 2014, 5:53 AM
Hi,i've same issue while adding tab dynamically.Please post any workaround for same...!!!Thanks in adv.

amistry
22 Jul 2014, 10:01 PM
Hi,

Is there any update with same??

Thanks- Arpit Mistry

SebTardif
13 Aug 2014, 12:57 PM
In Ext JS 5.0.1, we still have another bug about the code assuming all items are tabs:

In Ext.tab.Bar, child is a button, and it doesn't implement "activate".


beforeFocusableChildFocus: function(child, e) {
var me = this,
mixin = me.mixins.focusablecontainer;

mixin.beforeFocusableChildFocus.call(me, child, e);

if (!child.active) {
child.activate();
}

me.doActivateTab(child);
}
}