开发者

"bwrap" is undefined

I have a class extending the old Ext.Panel class. I'm now trying to migrate my application with help of the migration guide provided by sencha. I'm using a modification of the ext3 "Portal"-Example.

When trying to load my application i get some "deprecated" and "breaking" errors with a good explaination. But there is one error, i can't fix. It says "portal.bwrap is undefined" as mentioned above, "portal" is a subclass of Ext.Panel. In ext3 there was a property "bwrap" in the new ext there is not. And it is not documented neither in the compatibility lay开发者_开发问答er nor in the migration guide how to fix this in ext4.

Here are the two places where bwrap is used:

 constructor : function(portal, cfg){
    this.portal = portal;
    Ext.dd.ScrollManager.register(portal.body);
    Ext.ux.Portal.DropZone.superclass.constructor.call(this, portal.bwrap.dom, cfg);
    portal.body.ddScrollConfig = this.ddScrollConfig;
},

[...]

getGrid : function(){
    var box = this.portal.bwrap.getBox();
    box.columnX = [];
    this.portal.items.each(function(c){
         box.columnX.push({x: c.el.getX(), w: c.el.getWidth()});
    });
    return box;
},

Any suggestions?


bwrap was a div that wrapped that panel body. It no longer exists. Without seeing the code I can't say what you should do, but chances are you should either refer to the main panel element or the body itself.

FYI the portal example is already ported to 4.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜