Base class for vector classes with multiple coordinates. :meta private:
| 126 | |
| 127 | |
| 128 | class BaseMultiLocation(MacroElement): |
| 129 | """Base class for vector classes with multiple coordinates. |
| 130 | |
| 131 | :meta private: |
| 132 | |
| 133 | """ |
| 134 | |
| 135 | def __init__( |
| 136 | self, |
| 137 | locations: TypeMultiLine, |
| 138 | popup: Union[Popup, str, None] = None, |
| 139 | tooltip: Union[Tooltip, str, None] = None, |
| 140 | ): |
| 141 | super().__init__() |
| 142 | self.locations = validate_multi_locations(locations) |
| 143 | if popup is not None: |
| 144 | self.add_child(popup if isinstance(popup, Popup) else Popup(str(popup))) |
| 145 | if tooltip is not None: |
| 146 | self.add_child( |
| 147 | tooltip if isinstance(tooltip, Tooltip) else Tooltip(str(tooltip)) |
| 148 | ) |
| 149 | |
| 150 | def _get_self_bounds(self) -> List[List[Optional[float]]]: |
| 151 | """Compute the bounds of the object itself.""" |
| 152 | return get_bounds(self.locations) |
| 153 | |
| 154 | |
| 155 | class PolyLine(BaseMultiLocation): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…