Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shatvl committed Aug 27, 2019
1 parent 7204116 commit 436df56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/client/components/widgets/view/WidgetsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const DefaultWidget = withGroupColor(require('../widget/DefaultWidget'));
const getWidgetGroups = (groups = [], w) => groups.filter(g => find(g.widgets, id => id === w.id));
require('react-grid-layout-resize-prevent-collision/css/styles.css');

const WIDGET_MOBILE_RIGHT_SPACE = 34;
const getResponsiveWidgetWidth = width => width < 480 ? width - WIDGET_MOBILE_RIGHT_SPACE : width;

module.exports = pure(({
id,
style,
Expand Down Expand Up @@ -56,7 +59,7 @@ module.exports = pure(({
key={id || "widgets-view"}
useDefaultWidthProvider={useDefaultWidthProvider}
measureBeforeMount={measureBeforeMount}
width={!useDefaultWidthProvider ? width : undefined}
width={!useDefaultWidthProvider ? getResponsiveWidgetWidth(width) : undefined}
isResizable={canEdit}
isDraggable={canEdit}
draggableHandle={".draggableHandle"}
Expand Down

0 comments on commit 436df56

Please sign in to comment.