Skip to content

Commit

Permalink
Rename AnnotatorElement to AnnotationDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Sep 19, 2023
1 parent 06d41f4 commit 658b40f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions holonote/annotate/annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def commit(self, return_commits=False):
return commits


class AnnotatorElement(param.Parameterized):
class AnnotationDisplay(param.Parameterized):
rect_min = param.Number(default=-1000, doc="Temporary parameter until vectorized element fully supported")

rect_max = param.Number(default=1050, doc="Temporary parameter until vectorized element fully supported")
Expand Down Expand Up @@ -762,15 +762,15 @@ def __init__(self, spec: dict, **params):
@classmethod
def _infer_kdim_dtypes(self, element: hv.Element) -> dict:
# Remove?
return AnnotatorElement._infer_kdim_dtypes(element)
return AnnotationDisplay._infer_kdim_dtypes(element)

def _create_annotation_element(self, element_key: tuple[str, ...]) -> AnnotatorElement:
def _create_annotation_element(self, element_key: tuple[str, ...]) -> AnnotationDisplay:
for key in element_key:
if key not in self.spec:
raise ValueError(f"Dimension {key!r} not in spec")
return AnnotatorElement(self, kdims=list(element_key))
return AnnotationDisplay(self, kdims=list(element_key))

def get_element(self, kdims: tuple[str, ...] | str) -> AnnotatorElement:
def get_element(self, kdims: tuple[str, ...] | str) -> AnnotationDisplay:
element_key = (kdims,) if isinstance(kdims, str) else tuple(map(str, kdims))
if element_key not in self._elements:
self._elements[element_key] = self._create_annotation_element(element_key)
Expand Down

0 comments on commit 658b40f

Please sign in to comment.