select-your-own-seat

Expand History Expand History
Collapse History Collapse History

Replace Seat <svg> elements with <use>

Extract a separate <svg> nested within the map that is visually hidden. This <svg> element declares a <symbol> element with an id attribute named to represent a Seat‘s unselected icon.

Replace our Seat’s corresponding <svg> elements with <use> elements that reference our <symbol> elements by declaring xlink:href attribute which refers to the <symbol> element’s id attribute.