Skip to main content

isObjectVisible

Type: function(object, extraConfig)

A function that should return true if an object is visible, and false otherwise. When an object is invisible, it can't be selected or interacted with. Can be based on object.type, object.status, object.category, or on other criteria.

The object types that can be made invisible are: "seat", "table", "booth", "generalAdmission" and "section".

By default, all objects are visible.

The parameters that are passed to isObjectVisible are:

  • object: The current object.
  • extraConfig: Variables and data from your application. See extraConfig.
Accessing your application variables

This function is called inside the Seats.io iFrame and cannot access variables defined in the scope of your application. To do so, pass them first through the extraConfig configuration parameter.

isObjectVisible: function(object, extraConfig) {
if(object.category.label === 'Ground Floor') {
return true;
}
return false;
}
Warning

this function is called for each object on the chart; make sure it's fast, or chart rendering times will suffer. Avoid using slow methods such as Array.indexOf. Read more here.