简体   繁体   中英

Get relative position with extjs

What's the proper way to get the position of an element on the page relative to the document?

offsety/x is the jquery variant: http://docs.jquery.com/CSS/offset

I need the EXTJS variant please.

Edit

Possible problem. Because grid components are not part off the dom, the grid height is not taken into consideration. I think I need a callback on the reload function off the grid, but I don´t yet know how to do that.

Each component has getEl() method, that will return Ext.Element object. This in turn has getXY() , getX() and getY() methods (as well as several others that might be useful for you)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM