Skip to content

Commit

Permalink
Add automatic collate for Overlay of AdjointLayouts (#4586)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 2, 2020
1 parent 90bd54b commit 4064553
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions holoviews/plotting/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import param

from ..core import (HoloMap, DynamicMap, CompositeOverlay, Layout,
Overlay, GridSpace, NdLayout, NdOverlay)
Overlay, GridSpace, NdLayout, NdOverlay, AdjointLayout)
from ..core.options import CallbackError, Cycle
from ..core.ndmapping import item_check
from ..core.spaces import get_nested_streams
Expand All @@ -27,7 +27,7 @@ def displayable(obj):
Predicate that returns whether the object is displayable or not
(i.e whether the object obeys the nesting hierarchy
"""
if isinstance(obj, Overlay) and any(isinstance(o, (HoloMap, GridSpace))
if isinstance(obj, Overlay) and any(isinstance(o, (HoloMap, GridSpace, AdjointLayout))
for o in obj):
return False
if isinstance(obj, HoloMap):
Expand All @@ -46,7 +46,7 @@ class Warning(param.Parameterized): pass
def collate(obj):
if isinstance(obj, Overlay):
nested_type = [type(o).__name__ for o in obj
if isinstance(o, (HoloMap, GridSpace))][0]
if isinstance(o, (HoloMap, GridSpace, AdjointLayout))][0]
display_warning.param.warning(
"Nesting %ss within an Overlay makes it difficult to "
"access your data or control how it appears; we recommend "
Expand Down

0 comments on commit 4064553

Please sign in to comment.