Skip to content

Commit

Permalink
Allow links at the OverlayPlot level
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Aug 4, 2023
1 parent 7a1f5ff commit d690a2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions holoviews/core/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@ def clone(self, data=None, shared_data=True, new_type=None, link=True,

if data is None and shared_data:
data = self.data
if link:
settings['plot_id'] = self._plot_id
if link: # HACK
settings['plot_id'] = self._plot_id
# Apply name mangling for __ attribute
pos_args = getattr(self, '_' + type(self).__name__ + '__pos_params', [])
return clone_type(data, *args, **{k:v for k,v in settings.items()
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/bokeh/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def find_links(cls, root_plot):
Traverses the supplied plot and searches for any Links on
the plotted objects.
"""
plot_fn = lambda x: isinstance(x, GenericElementPlot) and not isinstance(x, GenericOverlayPlot)
plot_fn = lambda x: isinstance(x, (GenericElementPlot, GenericOverlayPlot))
plots = root_plot.traverse(lambda x: x, [plot_fn])
potentials = [cls.find_link(plot) for plot in plots]
source_links = [p for p in potentials if p is not None]
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ def link_sources(self):
zorders = [self.zorder]

if isinstance(self, GenericOverlayPlot) and not self.batched:
sources = []
sources = [self.hmap.last]
elif not self.static or isinstance(self.hmap, DynamicMap):
sources = [o for i, inputs in self.stream_sources.items()
for o in inputs if i in zorders]
Expand Down

0 comments on commit d690a2e

Please sign in to comment.