modal: relative mode only works on position, size must stay relative to the window size otherwise it can't break out of parent boundaries
This commit is contained in:
parent
4b250fc389
commit
8e3a186a3f
3 changed files with 4 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ As of this version, packages except the `node` package are bundled with a midi b
|
|||
- widgets
|
||||
- keyboard: add `velocity` property (allows mapping the touch coordinates between `off` (top) and `on` (bottom))
|
||||
- input: add `validation` property (allows defining a regular expression that the value must match)
|
||||
- modal: add `relative` geometry property
|
||||
- modal: add `relative` position property
|
||||
|
||||
- midi
|
||||
- accept sending sysex strings without spaces between the bytes
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ class Modal extends Panel {
|
|||
},
|
||||
geometry: {
|
||||
_separator_modal_geometry: 'Modal geometry',
|
||||
relative: {type: 'boolean', value: false, help: 'Set to `true` to make the modal\'s position and size relative to the button\'s.'},
|
||||
popupWidth: {type: 'number|percentage', value: '80%', help: 'Modal popup\'s size'},
|
||||
popupHeight: {type: 'number|percentage', value: '80%', help: 'Modal popup\'s size'},
|
||||
popupLeft: {type: 'number|percentage', value: 'auto', help: 'Modal popup\'s position'},
|
||||
popupTop: {type: 'number|percentage', value: 'auto', help: 'Modal popup\'s position'},
|
||||
relative: {type: 'boolean', value: false, help: 'Set to `true` to make the modal\'s position relative to the button\'s position.'},
|
||||
},
|
||||
style: {
|
||||
_separator_modal_style: 'Modal style',
|
||||
|
|
|
|||
|
|
@ -523,12 +523,13 @@
|
|||
right: auto;
|
||||
top: auto;
|
||||
bottom: auto;
|
||||
position: absolute;
|
||||
width: var(--width, 100%);
|
||||
height: var(--height, 100%);
|
||||
margin-top: calc(-1 * var(--widget-spacing));
|
||||
margin-left: calc(-1 * var(--widget-spacing));
|
||||
padding: var(--widget-spacing);
|
||||
align-items:flex-start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue