Skip to content

Commit

Permalink
Merge pull request ngageoint#867 in WV/opensphere from ~ROYALG/opensp…
Browse files Browse the repository at this point in the history
…here:THIN-14128 to master

* commit '63965092a7ab135b06a935371a1f8104123d851c':
  feat(theming): fixed colorblind themes when adding an exception theme
  feat(scss): added content fit styling to scale images
  • Loading branch information
gregroyal committed Aug 22, 2019
2 parents 4978b0a + 6396509 commit f781095
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions scss/os/_utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ $aspect-ratios: ((16, 9), (4, 3));
}
}


// --------------------------------- Highlight Style -----------------------------------//
.u-highlight-text {
@include bg-text-variant($yellow);
Expand Down
13 changes: 11 additions & 2 deletions src/os/config/themesettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,19 @@ os.config.ThemeSettings.setTheme = function() {
os.settings.set(os.config.ThemeSettings.Keys.ACCESSIBLE_THEME, accessibleTheme);
}

var theme = goog.object.findValue(os.config.ThemeSettings.themeExceptions, function(value, key) {
var theme = null;
var exceptionTheme = goog.object.findValue(os.config.ThemeSettings.themeExceptions, function(value, key) {
return window.location.hash.indexOf(key) != -1;
});
if (accessibleTheme && accessibleThemes[displayTheme]) {

if (exceptionTheme) {
if (accessibleTheme && accessibleThemes[exceptionTheme]) {
// Get this flavor of the theme
theme = accessibleThemes[exceptionTheme][accessibleTheme];
} else {
theme = accessibleThemes[exceptionTheme]['Normal'];
}
} else if (accessibleTheme && accessibleThemes[displayTheme]) {
// Get this flavor of the theme
theme = accessibleThemes[displayTheme][accessibleTheme];
}
Expand Down

0 comments on commit f781095

Please sign in to comment.