Skip to content

Commit

Permalink
More Color: picker tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
turner committed Nov 9, 2024
1 parent 513299f commit defd15b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 24 deletions.
14 changes: 9 additions & 5 deletions css/_igv-ui-colorpicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,20 @@ $igv-color-swatch-border-width: 2px;
height: $igv-color-swatch-size;

font-family: $igv-default-font-face;
font-size: medium;
font-size: .90rem;
font-weight: 400;

color: black;
background-color: rgba(200,200,200);
color: $igv-trackgear-font-color;
background-color: $igv-navbar-toggle-light-color;

border-style: solid;
border-width: $igv-color-swatch-border-width;
border-color: rgb(99, 99, 99);
border-width: thin;
border-color: white;
border-radius: 4px;

}

.igv-ui-color-more-colors:hover {
border-color: $igv-navbar-toggle-dark-dark;
}

14 changes: 9 additions & 5 deletions css/igv.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/embedCss.js

Large diffs are not rendered by default.

23 changes: 10 additions & 13 deletions js/ui/components/genericColorPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,16 @@ function createAndPresentMoreColorsPicker(parent, colorHandler) {
colorPickerContainer.remove()
}

function dismissPicker() {
picker.destroy()
colorPickerContainer.remove()
document.removeEventListener('click', onOutsideClick);
}

function onOutsideClick(event) {
if (!colorPickerContainer.contains(event.target) && parent !== event.target) {
dismissPicker();
}
}

document.addEventListener('click', onOutsideClick);
// function onOutsideClick(event) {
// if (!colorPickerContainer.contains(event.target) && parent !== event.target) {
// picker.destroy()
// picker = null
// colorPickerContainer.remove()
// document.removeEventListener('click', onOutsideClick);
// }
// }
//
// document.addEventListener('click', onOutsideClick);

picker.show()
}
Expand Down

0 comments on commit defd15b

Please sign in to comment.