Skip to content

Commit

Permalink
Fixed initialization bug on dynamic collate
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Apr 5, 2017
1 parent 5196ddc commit 00bec26
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions holoviews/core/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,22 +821,23 @@ def collate(self):
"""
# Initialize
if self.last is not None:
pass
initialized = self
else:
self.clone()[self._initial_key()]
initialized = self.clone()
initialized[initialized._initial_key()]

if not isinstance(self.last, (Layout, NdLayout, GridSpace)):
if not isinstance(initialized.last, (Layout, NdLayout, GridSpace)):
return self

container = self.last.clone(shared_data=False)
container = initialized.last.clone(shared_data=False)

# Get stream mapping from callback
remapped_streams = []
streams = self.callback.stream_mapping
for i, (k, v) in enumerate(self.last.data.items()):
for i, (k, v) in enumerate(initialized.last.data.items()):
vstreams = streams.get(i, [])
if not vstreams:
if isinstance(self.last, Layout):
if isinstance(initialized.last, Layout):
for l in range(len(k)):
path = '.'.join(k[:l])
if path in streams:
Expand Down

0 comments on commit 00bec26

Please sign in to comment.