Abstract class to add an element to another element.
| 143 | |
| 144 | |
| 145 | class ElementAddToElement(MacroElement): |
| 146 | """Abstract class to add an element to another element.""" |
| 147 | |
| 148 | _template = Template( |
| 149 | """ |
| 150 | {% macro script(this, kwargs) %} |
| 151 | {{ this.element_name }}.addTo({{ this.element_parent_name }}); |
| 152 | {% endmacro %} |
| 153 | """ |
| 154 | ) |
| 155 | |
| 156 | def __init__(self, element_name: str, element_parent_name: str): |
| 157 | super().__init__() |
| 158 | self.element_name = element_name |
| 159 | self.element_parent_name = element_parent_name |
| 160 | |
| 161 | |
| 162 | class IncludeStatement(MacroElement): |