Skip to content

Commit

Permalink
#129 BottomBar UI Visibility Modal (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman authored Jan 19, 2022
1 parent 8f512df commit 452ef6e
Show file tree
Hide file tree
Showing 12 changed files with 634 additions and 276 deletions.
12 changes: 9 additions & 3 deletions src/css/mmgis.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ body {
--color-m: #c4c4c4;
--color-n: #151619;
--color-o: #1a628e;
--color-p: #747474;

--color-green: #00d200;
--color-yellow: #d2b800;
Expand Down Expand Up @@ -156,6 +157,9 @@ body {
justify-content: space-evenly;
align-items: center;
}
.splitterVInner > div {
border-radius: 3px;
}

.splitterVInner i {
width: 48px;
Expand Down Expand Up @@ -416,11 +420,11 @@ body {
color: var(--color-f);
width: 30px;
height: 30px;
line-height: 29px !important;
border-radius: 3px;
margin-bottom: 4px;
margin-bottom: 5px;
font-size: 18px !important;
border: none !important;
border-radius: 0 !important;
border-radius: 3px !important;
background: var(--color-a) !important;
transition: color 0.2s ease-in 0s;
}
Expand Down Expand Up @@ -625,6 +629,8 @@ body {
padding: 0px 8px;
font-size: 14px;
color: var(--color-mw2);
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
flex: 1;
transition: background 0.2s ease-out, border 0.2s ease-out;
}
Expand Down
93 changes: 93 additions & 0 deletions src/css/mmgisUI.css
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ input[type='range'].verticalSlider:focus::-ms-fill-upper {
}

.mmgisHoverBlue {
cursor: pointer;
color: var(--color-f);
transition: all 0.2s ease-in 0s;
}
Expand All @@ -1292,3 +1293,95 @@ input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

/* MMGIS checkbox */

/* CHECKBOX */
/*
<div class="mmgis-checkbox">
<input type="checkbox" checked id="checkbox" />
<label for="checkbox"></label>
</div>
*/
/*
<div class="mmgis-checkbox"><input type="checkbox" checked id="checkbox" /><label for="checkbox"></label></div>
*/
.mmgis-checkbox {
position: relative;
width: 20px;
height: 20px;
margin: 5px;
}

.mmgis-checkbox label {
background-color: var(--color-k);
border: 2px solid var(--color-p);
cursor: pointer;
width: 20px;
height: 20px;
position: absolute;
left: 0;
top: 0;
border-radius: 3px;
transition: all 0.2s ease;
}
@media (pointer: fine) and (hover: hover) {
.mmgis-checkbox label:hover {
background-color: var(--color-j);
border: 2px solid var(--color-f);
}
}

.mmgis-checkbox label::after {
border: 2px solid var(--color-k);
border-top: none;
border-right: none;
content: '';
width: 9px;
height: 4px;
position: absolute;
left: 4px;
top: 5px;
opacity: 0;
transform: rotate(-45deg);
transition: all 0.2s ease;
}

.mmgis-checkbox input[type='checkbox'] {
visibility: hidden;
}

.mmgis-checkbox input[type='checkbox']:checked + label {
background-color: var(--color-f);
border-color: var(--color-f);
}

.mmgis-checkbox input[type='checkbox']:checked + label::after {
opacity: 1;
}

.mmgisCheckbox {
margin: 5px;
width: 20px;
height: 20px;
border: 2px solid #777;
border-radius: 3px;
cursor: pointer;
transition: background 0.2s cubic-bezier(0.39, 0.575, 0.565, 1),
border 0.1s cubic-bezier(0.39, 0.575, 0.565, 1),
border-radius 0.1s cubic-bezier(0.39, 0.575, 0.565, 1);
}
.mmgisCheckbox.on {
background: white;
border: 0px solid #777;
}
.mmgisCheckbox:not(.on):hover {
background: rgba(255, 255, 255, 0.1);
}
.mmgisCheckbox.loading {
background: transparent;
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: #fff;
animation: layerLoadingSpin 1s ease-in-out infinite;
}
18 changes: 9 additions & 9 deletions src/essence/Ancillary/Coordinates.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
line-height: 30px;
padding: 0px 6px;
background: var(--color-a);
border-radius: 4px;
border-radius: 3px;
display: flex;
}
#CoordinatesDiv #mouseDesc {
Expand Down Expand Up @@ -48,7 +48,7 @@
position: absolute;
right: 63px;
display: flex;
border-radius: 4px;
border-radius: 3px;
transition: opacity 0.2s ease-in;
}
#CoordinatesDiv .mouseLngLatPicking.active {
Expand Down Expand Up @@ -96,8 +96,8 @@
#CoordinatesDiv #mouseGoPicking {
padding: 0px 6px;
background: var(--color-h);
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
transition: background 0.2s ease-in;
cursor: pointer;
color: var(--color-a);
Expand All @@ -112,7 +112,7 @@
color: var(--color-f);
text-align: center;
cursor: pointer;
border-radius: 4px;
border-radius: 3px;
width: 24px;
height: 24px;
line-height: 24px;
Expand Down Expand Up @@ -141,8 +141,8 @@
line-height: 24px;
margin: 3px 0px 3px 5px;
pointer-events: all;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
transition: all 0.2s ease-in;
}
#CoordinatesDiv #toggleTimeUI > i:before {
Expand All @@ -156,7 +156,7 @@
#CoordinatesDiv #toggleTimeUI.active {
transform: translateY(-10px);
color: var(--color-mmgis);
border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
height: 42px;
}
1 change: 1 addition & 0 deletions src/essence/Ancillary/Login/Login.css
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
line-height: 28px;
margin-left: 5px;
padding-left: 2px;
border-radius: 3px;
pointer-events: all;
transition: color 0.2s ease-in 0s;
}
Expand Down
14 changes: 13 additions & 1 deletion src/essence/Ancillary/Modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@
right: 0;
color: #ddd;
cursor: pointer;
margin: 8px 6px;
padding: 16px;
transition: color 0.2s ease;
background: var(--color-k);
border-bottom-left-radius: 100%;
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 1);
}

#mmgisModalClose i {
position: relative;
top: -5px;
right: -5px;
}
#mmgisModalClose:hover {
color: var(--color-c);
}

#mmgisModalInner {
Expand Down
1 change: 1 addition & 0 deletions src/essence/Ancillary/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import './Modal.css'
const Modal = {
_onRemoveCallback: null,
set: function (html, onAddCallback, onRemoveCallback) {
if ($('#mmgisModal')) $('#mmgisModal').remove()
// prettier-ignore
$('body').append([
"<div id='mmgisModal'>",
Expand Down
2 changes: 2 additions & 0 deletions src/essence/Ancillary/Search.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
border: none;
border-right: 1px solid var(--color-b);
cursor: pointer;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
#SearchClear {
margin-left: 0px;
Expand Down
44 changes: 26 additions & 18 deletions src/essence/Basics/Map_/Map_.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,7 @@ let Map_ = {

//Add a graticule
if (L_.configData.look && L_.configData.look.graticule == true) {
L.latlngGraticule({
showLabel: true,
color: '#bbb',
weight: 1,
zoomInterval: [
{ start: 2, end: 3, interval: 40 },
{ start: 4, end: 5, interval: 20 },
{ start: 6, end: 7, interval: 10 },
{ start: 8, end: 9, interval: 5 },
{ start: 10, end: 11, interval: 0.4 },
{ start: 12, end: 13, interval: 0.2 },
{ start: 14, end: 15, interval: 0.1 },
{ start: 16, end: 17, interval: 0.01 },
{ start: 18, end: 19, interval: 0.005 },
{ start: 20, end: 21, interval: 0.0025 },
{ start: 21, end: 30, interval: 0.00125 },
],
}).addTo(Map_.map)
this.toggleGraticule(true)
}

//When done zooming, hide the things you're too far out to see/reveal the things you're close enough to see
Expand Down Expand Up @@ -268,6 +251,31 @@ let Map_ = {
//Set the time for any time enabled layers
TimeControl.updateLayersTime()
},
toggleGraticule: function (on) {
if (on)
this.graticule = L.latlngGraticule({
showLabel: true,
color: '#bbb',
weight: 1,
zoomInterval: [
{ start: 2, end: 3, interval: 40 },
{ start: 4, end: 5, interval: 20 },
{ start: 6, end: 7, interval: 10 },
{ start: 8, end: 9, interval: 5 },
{ start: 10, end: 11, interval: 0.4 },
{ start: 12, end: 13, interval: 0.2 },
{ start: 14, end: 15, interval: 0.1 },
{ start: 16, end: 17, interval: 0.01 },
{ start: 18, end: 19, interval: 0.005 },
{ start: 20, end: 21, interval: 0.0025 },
{ start: 21, end: 30, interval: 0.00125 },
],
}).addTo(Map_.map)
else {
this.rmNotNull(this.graticule)
this.graticule = null
}
},
clear: function () {
this.map.eachLayer(function (layer) {
Map_.map.removeLayer(layer)
Expand Down
56 changes: 56 additions & 0 deletions src/essence/Basics/UserInterface_/BottomBar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#mainSettingsModal {
background: var(--color-k);
width: 400px;
margin: 40px;
border-radius: 3px;
}
#mainSettingsModalTitle {
padding: 0px 0px 0px 10px;
height: 40px;
line-height: 39px;
font-size: 18px;
background: var(--color-i);
border-top-left-radius: 3px;
border-top-right-radius: 3px;
display: flex;
justify-content: space-between;
}
#mainSettingsModalTitle > div:first-child {
display: flex;
}
#mainSettingsModalTitle > div:first-child > div {
margin-left: 6px;
line-height: 40px;
}
#mainSettingsModalClose {
width: 40px;
height: 40px;
text-align: center;
}
#mainSettingsModalContent {
padding: 10px 20px;
}
.mainSettingsModalSection {
}
.mainSettingsModalSectionTitle {
}
.mainSettingsModalSectionOptions {
list-style-type: none;
margin: 8px 0px;
padding: 0;
}
.mainSettingsModalSectionOptions li {
display: flex;
height: 30px;
line-height: 30px;
padding-left: 10px;
}
.mainSettingsModalSectionOptions li > div:last-child {
padding-left: 3px;
}
.mainSettingsModalHR {
width: 100%;
height: 1px;
background: var(--color-b);
margin: 4px 0px;
}
Loading

0 comments on commit 452ef6e

Please sign in to comment.