To specify a preset theme, just do the following:
The script will generate an SVGElement which contains a g
element as its sole child. Every part of the court is an element to this g
element and can be customized seperately. The below image shows each part of the court and they are listed in z-index order.
g
element. You can define some global property here.trapezoid
is true
in options.To hide a path, just set it to false
and you are done!
Note: You should be care of the property values for that you might encounter the problem of script injection if they are unsafe string.
You can use data
option to extend the preset theme.