Counts the number of visible Areas.
The filter is tested via
DiviAreaItem.isType() to determine, which Areas to count.
- (string, optional) A filter to limit Areas that are included in the callback loop.
Number of currently visible Areas (integer).
// Count all visible Areas. console.log( 'Visible Areas:', DiviArea.Data.countVisibleAreas() ); // Count all visible Popups. console.log( 'Visible Popups:', DiviArea.Data.countVisibleAreas( 'popup' ) );
This method is used internally to determine, whether a Popup is visible or not. When no Popup is visible, the overlay is removed (via