Skip to content

Commit f781095

Browse files
committed
Merge pull request ngageoint#867 in WV/opensphere from ~ROYALG/opensphere: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
2 parents 4978b0a + 6396509 commit f781095

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

scss/os/_utils.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ $aspect-ratios: ((16, 9), (4, 3));
617617
}
618618
}
619619

620+
620621
// --------------------------------- Highlight Style -----------------------------------//
621622
.u-highlight-text {
622623
@include bg-text-variant($yellow);

src/os/config/themesettings.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,19 @@ os.config.ThemeSettings.setTheme = function() {
265265
os.settings.set(os.config.ThemeSettings.Keys.ACCESSIBLE_THEME, accessibleTheme);
266266
}
267267

268-
var theme = goog.object.findValue(os.config.ThemeSettings.themeExceptions, function(value, key) {
268+
var theme = null;
269+
var exceptionTheme = goog.object.findValue(os.config.ThemeSettings.themeExceptions, function(value, key) {
269270
return window.location.hash.indexOf(key) != -1;
270271
});
271-
if (accessibleTheme && accessibleThemes[displayTheme]) {
272+
273+
if (exceptionTheme) {
274+
if (accessibleTheme && accessibleThemes[exceptionTheme]) {
275+
// Get this flavor of the theme
276+
theme = accessibleThemes[exceptionTheme][accessibleTheme];
277+
} else {
278+
theme = accessibleThemes[exceptionTheme]['Normal'];
279+
}
280+
} else if (accessibleTheme && accessibleThemes[displayTheme]) {
272281
// Get this flavor of the theme
273282
theme = accessibleThemes[displayTheme][accessibleTheme];
274283
}

0 commit comments

Comments
 (0)