Skip to content

Commit

Permalink
Set max height for stylepicker dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jokd committed Oct 26, 2023
1 parent 833a16d commit 6586a95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/controls/legend/overlayproperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const OverlayProperties = function OverlayProperties(options = {}) {
direction: 'up',
cls: 'o-stylepicker text-black flex',
contentCls: 'bg-grey-lighter text-smaller rounded',
contentStyle: 'max-height: 12em; overflow-y: scroll;',
buttonCls: 'bg-white border text-black box-shadow',
buttonTextCls: 'text-smaller',
text: getStyleDisplayName(layer.get('styleName')),
Expand Down
3 changes: 2 additions & 1 deletion src/ui/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default function Dropdown(options = {}) {
cls = '',
containerCls = 'collapse-container',
contentCls = 'bg-white',
contentStyle = '',
buttonCls = 'padding-small rounded light box-shadow',
buttonIconCls = '',
buttonContainerCls = '',
Expand Down Expand Up @@ -108,7 +109,7 @@ export default function Dropdown(options = {}) {
cls: 'dropdown',
containerCls,
contentCls: `${contentCls}`,
contentStyle: `${position}:calc(100% + 2px);`,
contentStyle: `${position}:calc(100% + 2px);${contentStyle}`,
collapseX: false,
headerComponent,
contentComponent,
Expand Down

0 comments on commit 6586a95

Please sign in to comment.