Skip to content

Commit

Permalink
Implemented DynamicMap.options method
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 5, 2018
1 parent 2bff7e8 commit 77c94c2
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions holoviews/core/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,20 +857,34 @@ def _execute_callback(self, *args):
return self._style(retval)


def opts(self, options=None, **kwargs):
def opts(self, options=None, backend=None, **kwargs):
"""
Apply the supplied options to a clone of the DynamicMap which is
then returned. Note that if no options are supplied at all,
all ids are reset.
"""
from ..util import Dynamic
dmap = Dynamic(self, operation=lambda obj, **dynkwargs: obj.opts(options, **kwargs),
dmap = Dynamic(self, operation=lambda obj, **dynkwargs: obj.opts(options, backend, **kwargs),
streams=self.streams, link_inputs=True)
dmap.data = OrderedDict([(k, v.opts(options, **kwargs))
for k, v in self.data.items()])
return dmap


def options(self, options=None, backend=None, **kwargs):
"""
Apply the supplied options to a clone of the DynamicMap which is
then returned. Note that if no options are supplied at all,
all ids are reset.
"""
from ..util import Dynamic
dmap = Dynamic(self, operation=lambda obj, **dynkwargs: obj.options(options, backend, **kwargs),
streams=self.streams, link_inputs=True)
dmap.data = OrderedDict([(k, v.options(options, backend, **kwargs))
for k, v in self.data.items()])
return dmap


def clone(self, data=None, shared_data=True, new_type=None, link_inputs=True,
*args, **overrides):
"""
Expand Down

0 comments on commit 77c94c2

Please sign in to comment.