DiviArea.Data.getVisibleArea(id, type)
Returns either the top-most visible Area, or the Area with the given ID.
Params
id
- The Area ID to fetch; empty for the top most entry.
type
- The Area type to filter for – the function returns the top-most visible area of the given type.
Default: all
Returns
Returns the DiviAreaItem
object that matches the id
and type
parameters. If no such visible Area was found, the function returns false
.
Examples
// Get the top-most visible Area of any type.
DiviArea.Data.getVisibleArea();
// Get the top-most visible Fly-In.
DiviArea.Data.getVisibleArea('', 'flyin');
// Check, if the Area `#sample' is visible.
if ( DiviArea.Data.getVisibleArea('#sample') ) {
console.log('Sample Area is visible');
}
Notes
No notes