From df1a5803bedb3195060f34322fbe7ddf91b37cc9 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Fri, 17 Jan 2020 01:35:05 +0100 Subject: [PATCH] Allow other layers in compose (#4189) --- holoviews/annotators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/holoviews/annotators.py b/holoviews/annotators.py index c715d769d4..2d46dc6311 100644 --- a/holoviews/annotators.py +++ b/holoviews/annotators.py @@ -11,7 +11,7 @@ from panel.layout import Row, Tabs from panel.util import param_name -from .core import DynamicMap, Element, Layout, Overlay, Store +from .core import DynamicMap, HoloMap, ViewableElement, Element, Layout, Overlay, Store from .core.util import isscalar from .element import Rectangles, Path, Polygons, Points, Table, Curve from .plotting.links import VertexTableLink, DataLink, RectanglesTableLink, SelectionLink @@ -115,7 +115,7 @@ def compose(cls, *annotators): elif isinstance(annotator, annotate): layers.append(annotator.plot) tables += [t[0].object for t in annotator.editor] - elif isinstance(annotator, Element): + elif isinstance(annotator, (HoloMap, ViewableElement)): layers.append(annotator) else: raise ValueError("Cannot compose %s type with annotators." %