Skip to main content

Seat Methods

Methods available on seat objects.

Selection Methods

select()

Select the seat.

seat.select();

unSelect()

Unselect the seat.

seat.unSelect();

isSelected()

Check if seat is selected.

if (seat.isSelected()) {
console.log('Seat is selected');
}

Properties

item

Access seat data.

const seatData = seat.item;
console.log(seatData.id, seatData.title, seatData.salable);

block

Access parent block.

const blockTitle = seat.block.title;

Example

seatmap.addEventListener("seat_click", (seat) => {
if (seat.item.salable) {
if (seat.isSelected()) {
seat.unSelect();
} else {
seat.select();
}
}
});