Skip to content

Commit

Permalink
Merge pull request #725 from cmv/enhancement/mobile-basemap-dropdown
Browse files Browse the repository at this point in the history
Add conditional css to hide basemap text on small screens
  • Loading branch information
tmcgee authored May 26, 2017
2 parents c9c56b5 + 565e210 commit 07ffb1b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
4 changes: 2 additions & 2 deletions viewer/js/gis/dijit/Basemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ define([
widgetsInTemplate: true,
i18n: i18n,
title: i18n.title,

baseClass: 'basemapWidget',
basemaps: {},
currentBasemap: null,
mapStartBasemap: null,
Expand Down Expand Up @@ -174,4 +174,4 @@ define([
}
}
});
});
});
32 changes: 22 additions & 10 deletions viewer/js/gis/dijit/Basemaps/css/Basemaps.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
.selectedIcon:before {
font-family: FontAwesome;
content: "\f046";
.basemapWidget .selectedIcon:before {
font-family: FontAwesome;
content: "\f046";
}

.emptyIcon:before {
font-family: FontAwesome;
content: "\f096";
.basemapWidget .emptyIcon:before {
font-family: FontAwesome;
content: "\f096";
}

.basemapsIcon:before {
font-family: FontAwesome;
content: "\f009";
}
.basemapWidget .basemapsIcon:before {
font-family: FontAwesome;
content: "\f009";
}


/* condense dropdown on small screens */

@media (max-width: 768px) {
.cmv .map .basemapWidget .dijitDropDownButton .dijitButtonNode {
padding: 4px 8px;
}
.cmv .map .basemapWidget .dijitButtonText {
display: none;
}
}
2 changes: 1 addition & 1 deletion viewer/js/gis/dijit/Basemaps/templates/Basemaps.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div>
<div class="${baseClass}">
<div data-dojo-type="dijit/form/DropDownButton" data-dojo-props="iconClass:'basemapsIcon'" data-dojo-attach-point="dropDownButton">
<span>
${title}
Expand Down

0 comments on commit 07ffb1b

Please sign in to comment.