Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS check if element is visible

Does ExtJS provide some quick way to check whether a given component is currently visible? I would normally check css properties like display and visible but what when one of parent elements is hidden?

like image 612
mgamer Avatar asked Dec 23 '10 13:12

mgamer


People also ask

How do you know if an element is visible on screen?

Summary. Use the getBoundingClientRect() method to get the size of the element and its relative position to the viewport. Compare the position of the element with the viewport height and width to check if the element is visible in the viewport or not.

What is Ext get?

Ext. get is shorthand for Ext. ComponentManager. get and whilst it is a call to a library function and may be less efficient is should be noted that there are ~180 methods available on Ext.


1 Answers

Try Ext.Component.isVisible()

like image 94
Mchl Avatar answered Oct 12 '22 06:10

Mchl