Skip to content

Commit

Permalink
Ensure responsive DynamicMap is not centered (#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Nov 14, 2019
1 parent fc701c0 commit 1d3583c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions panel/pane/holoviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def __init__(self, object=None, **params):

@param.depends('center', 'widget_location', watch=True)
def _update_layout(self):
from holoviews.core.options import Store
from holoviews.core import DynamicMap, Store
from holoviews.plotting.util import initialize_dynamic

loc = self.widget_location
if not len(self.widget_box):
Expand All @@ -110,8 +111,10 @@ def _update_layout(self):
if self.object is None:
opts = {}
else:
initialize_dynamic(self.object)
obj = self.object.last if isinstance(self.object, DynamicMap) else self.object
try:
opts = Store.lookup_options(backend, self.object, 'plot').kwargs
opts = Store.lookup_options(backend, obj, 'plot').kwargs
except:
opts = {}
responsive_modes = ('stretch_width', 'stretch_both', 'scale_width', 'scale_both')
Expand Down

0 comments on commit 1d3583c

Please sign in to comment.