Skip to content

Commit

Permalink
fix: set max height for stylepicker dropdown (#1880)
Browse files Browse the repository at this point in the history
* Set max height for stylepicker dropdown

* Update overlayproperties.js
  • Loading branch information
jokd authored Oct 27, 2023
1 parent 2c9af4f commit aa18263
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: auto;',
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 aa18263

Please sign in to comment.