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?
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.
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.
Try Ext.Component.isVisible()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With