Skip to content

Commit

Permalink
Dropdowns can expand up, draw tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Mar 16, 2022
1 parent f85b117 commit 909ce18
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/essence/Tools/Draw/DrawTool.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,11 +866,10 @@ var Test = {
)
$('#mmgisModal .drawToolFileSave').click()

$(
'#drawToolDrawFilesList > li:nth-child(2) .drawToolFileEdit'
).click()

setTimeout(function () {
$(
'#drawToolDrawFilesList > li:nth-child(2) .drawToolFileEdit'
).click()
c(
'File name updates',
$(
Expand All @@ -895,7 +894,7 @@ var Test = {
)

$('#mmgisModal .drawToolFileCancel').click()
}, Test.timeout)
}, Test.timeout * 3)
}, Test.timeout)
},
},
Expand Down
3 changes: 2 additions & 1 deletion src/essence/Tools/Layers/Filtering/Filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ const Filtering = {
`<i class='mdi mdi-greater-than mdi-18px' title='Greater than'></i>`,
],
'op',
opId
opId,
{ openUp: true }
)
)
Dropy.init($(elmId), function (idx) {
Expand Down
7 changes: 7 additions & 0 deletions src/external/Dropy/dropy.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,10 @@ dd {
.dropy.dark .dropy__title:hover {
border-color: #cccccc;
}

.dropy.openUp .dropy__content {
top: unset;
}
.dropy.openUp .dropy__content > ul {
transform: translateY(-100%);
}
5 changes: 3 additions & 2 deletions src/external/Dropy/dropy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ export default {
// items []
// placeholder
// selectedIndex int null for none
construct: function (items, placeholder, selectedIndex) {
construct: function (items, placeholder, selectedIndex, options) {
options = options || {}
// prettier-ignore
return [
'<dl class="dropy">',
`<dl class="dropy${options.openUp === true ? ' openUp' : ''}">`,
`<dt class="dropy__title"><span>${items[selectedIndex] || placeholder}</span></dt>`,
'<dd class="dropy__content">',
'<ul>',
Expand Down

0 comments on commit 909ce18

Please sign in to comment.