Commit 4b8481df authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

using seperate observation modules now

parent 5111dcc9
...@@ -42,7 +42,7 @@ module.exports = function(grunt) { ...@@ -42,7 +42,7 @@ module.exports = function(grunt) {
overrides : { overrides : {
"leaflet-exercise-control" : { "leaflet-exercise-control" : {
"main" : [ "main" : [
"src/leaflet-exercise-cards.js", "src/leaflet-exercise-control.js" ,"src/leaflet-observation.js", "src/leaflet-observation-sat.js", "src/leaflet-exercise-control.css" "src/leaflet-exercise-cards.js", "src/leaflet-exercise-control.js" , "src/leaflet-exercise-control.css"
] ]
}, },
"uikit-stw": { "uikit-stw": {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
"leaflet-container-control": "https://git.smhi.se/stw/leaflet-container-control.git", "leaflet-container-control": "https://git.smhi.se/stw/leaflet-container-control.git",
"leaflet-coordinates-control": "https://git.smhi.se/stw/leaflet-coordinates-control.git", "leaflet-coordinates-control": "https://git.smhi.se/stw/leaflet-coordinates-control.git",
"leaflet-forcing-boundary": "https://git.smhi.se/stw/leaflet-forcing-boundary.git", "leaflet-forcing-boundary": "https://git.smhi.se/stw/leaflet-forcing-boundary.git",
"leaflet-observation": "https://git.smhi.se/stw/leaflet-observation.git",
"intro.js": "^2.5.0" "intro.js": "^2.5.0"
}, },
"resolutions": { "resolutions": {
......
...@@ -61,11 +61,10 @@ ...@@ -61,11 +61,10 @@
<script src="../bower_components/leaflet.draw/dist/leaflet.draw.js"></script> <script src="../bower_components/leaflet.draw/dist/leaflet.draw.js"></script>
<script src="../bower_components/leaflet-coordinates-control/dist/leaflet-coordinates-control.js"></script> <script src="../bower_components/leaflet-coordinates-control/dist/leaflet-coordinates-control.js"></script>
<script src="../bower_components/leaflet-forcing-boundary/dist/leaflet-forcing-boundary.js"></script> <script src="../bower_components/leaflet-forcing-boundary/dist/leaflet-forcing-boundary.js"></script>
<script src="../bower_components/leaflet-observation/dist/leaflet-observation.js"></script>
<script src="../bower_components/intro.js/intro.js"></script> <script src="../bower_components/intro.js/intro.js"></script>
<script src="../src/leaflet-exercise-cards.js"></script> <script src="../src/leaflet-exercise-cards.js"></script>
<script src="../src/leaflet-exercise-control.js"></script> <script src="../src/leaflet-exercise-control.js"></script>
<script src="../src/leaflet-observation.js"></script>
<script src="../src/leaflet-observation-sat.js"></script>
<!-- endbower --> <!-- endbower -->
<script> <script>
......
.exercise-control .chevron-title {
border: 1px solid #ddd;
border-radius: 0px;
padding-top: 7px;
padding-bottom: 7px;
padding-left: 10px;
padding-right: 10px;
font-size: 12px;
margin-bottom: 2px;
}
.exercise-control .uk-button.uk-active {
box-shadow: inset 0 0 5px rgba(0,0,0,.05);
background-color: #ddd;
font-weight: 600;
}
.exercise-control .irs-from {
background-color: #ddd;
color: black;
}
.exercise-control .irs-to {
background-color: #ddd;
color: black;
}
.exercise-control .irs-slider.from {
display: none;
}
.exercise-control .irs-slider.to {
display: none;
}
.exercise-control .next-enabled {
box-shadow: inset 0 0 5px rgba(0,0,0,.05);
text-shadow: 0 -1px 0 rgba(0,0,0,.1);
background-color: #8cc14c;
color: #fff;
}
.exercise-control .irs-disabled {
opacity: 1;
}
.exercise-control .uk-dropdown-small {
min-width: 100px
}
.exercise-control .uk-autocomplete {
width: 100px
}
.exercise-control .form-label {
display: inline-block;
padding-right: 5px;
}
.exercise-control .badge-neutral {
background: lightgray;
}
.exercise-control .percentage {
width: 65px;
}
.exercise-control .title {
padding-left: 5px;
}
.exercise-control .chevron-icon {
float: right;
margin-top: 4px;
margin-right: 3px;
}
.exercise-control .select {
display: inline-block;
margin-left: 3px;
}
.exercise-control .acc-content {
padding-top: 0px;
padding-bottom: 15px;
}
.introjs-helperLayer {
background-color: rgba(255,255,255,0);
}
.introjs-prevbutton {
display: none;
}
.exercise-control .legend-text {
display: inline-block;
position: relative;
left: 5px;
}
.exercise-control .legend-box {
display: inline-block;
top: 1px;
position: relative;
}
/// <reference path="def/uikit.d.ts" />
/// <reference path="def/leaflet.d.ts" />
/// <reference path="def/moment.d.ts" />
/// <reference path="def/leaflet-forcing-boundary.d.ts" />
/// <reference path="def/reqwest.d.ts" />
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var EXLocation = (function (_super) {
__extends(EXLocation, _super);
function EXLocation(id, parentDiv, lang, langData, map, forcing, obs, type, initials) {
var _this = this;
var options = {};
options['single'] = true;
options['line'] = true;
options.polygon = {};
options['polygon']['show'] = true;
options['polygon']['name'] = 'Area';
options['type'] = type;
options['initials'] = initials;
_this = _super.call(this, id, 'Specify time and location', parentDiv, lang, langData, map, forcing, options) || this;
var self = _this;
var fieldset = L.DomUtil.create('fieldset', 'uk-margin-top');
_this.locationForm.insertBefore(fieldset, _this.locationForm.firstChild);
var satCallbackFn = function (latlngs, geojsonfeature, timestamp, id) {
self.clear();
var geojson = {};
geojson["type"] = "FeatureCollection";
geojson["features"] = [];
geojson["features"].push(geojsonfeature);
var observation = {
"id": id,
"provider": "EMSA",
"providerDataRef": null,
"providerImgRef": null,
"providerType": null,
"type": "SAT",
"date": moment.utc(timestamp).valueOf()
};
geojson.features[0].properties["observation"] = [];
geojson.features[0].properties["observation"].push(observation);
geojson.features[0].properties["simulation"] = {};
self.populateCard(geojson);
satdetectionHide();
};
function legendBox(fieldset, color, text, size) {
var rowDiv = L.DomUtil.create('div', 'uk-form-row uk-margin-remove', fieldset);
var legendBox = L.DomUtil.create('div', 'legend-box', rowDiv);
legendBox.style.backgroundColor = color;
legendBox.style.width = size;
legendBox.style.height = size;
legendBox.title = text;
var legendText = L.DomUtil.create('div', 'legend-text', rowDiv);
legendText.textContent = text;
}
if (obs && obs.sat) {
var obssatRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
self.satObs = new Observation.Sat(map, satCallbackFn, 'observation/oo');
var satDetectionDiv = L.DomUtil.create('div', '', obssatRowDiv);
var satDetectionList = L.DomUtil.create('dl', 'uk-description-list-line', satDetectionDiv);
var satDetectionItem = L.DomUtil.create('dt', '', satDetectionList);
var satDetectionHeading = L.DomUtil.create('h5', 'uk-width-1-1 chevron-title', satDetectionItem);
satDetectionHeading.textContent = "Satellite oil detections";
self.satDetectionChevronIcon = L.DomUtil.create('span', 'uk-icon-chevron-down chevron-icon', satDetectionHeading);
self.satDetectionContent = L.DomUtil.create('div', 'uk-animation-fade', satDetectionItem);
self.satDetectionContent.style.display = 'none';
var satdetectionShow = function () {
if (self.satDetectionChevronIcon.classList.contains('uk-icon-chevron-down')) {
self.satDetectionChevronIcon.classList.remove('uk-icon-chevron-down');
self.satDetectionChevronIcon.classList.add('uk-icon-chevron-up');
self.satDetectionContent.style.display = "";
self.satObs.show();
}
};
var satdetectionHide = function () {
if (self.satDetectionChevronIcon.classList.contains('uk-icon-chevron-up')) {
self.satDetectionChevronIcon.classList.remove('uk-icon-chevron-up');
self.satDetectionChevronIcon.classList.add('uk-icon-chevron-down');
self.satDetectionContent.style.display = 'none';
self.satObs.hide();
}
};
satDetectionHeading.onclick = function (evt) {
if (self.satDetectionChevronIcon.classList.contains('uk-icon-chevron-down')) {
satdetectionShow();
}
else {
satdetectionHide();
}
};
var satDetectionform = L.DomUtil.create('form', 'uk-form uk-form-stacked', self.satDetectionContent);
satDetectionform.onsubmit = function (e) {
e.preventDefault();
e.stopPropagation();
return false;
};
var satDetectionfieldset = L.DomUtil.create('fieldset', '', satDetectionform);
var satDetectionRowDiv = L.DomUtil.create('div', 'uk-form-row uk-margin-top', satDetectionfieldset);
_super.prototype.addLabelDiv.call(_this, satDetectionRowDiv, "Detection frequency", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-satdetection' target='_blank'>here</a>");
legendBox(satDetectionfieldset, 'rgb(255, 0, 0)', 'Within 24 hours', '10px');
legendBox(satDetectionfieldset, 'rgb(255, 153, 0)', 'Within 48 hours', '10px');
legendBox(satDetectionfieldset, 'rgb(255, 255, 0)', 'More than two days ago', '10px');
legendBox(satDetectionfieldset, 'rgb(255, 255, 255)', 'Older', '10px');
}
self.datetimeFormat = 'YYYY-MM-DD HH:mm';
self.datetimeTFormat = 'YYYY-MM-DDTHH:mm:ss.000';
self.dateFormat = 'YYYY-MM-DD';
self.timeFormat = 'HH:mm';
var obsdateRowDiv = L.DomUtil.create('div', 'uk-form-row uk-margin-remove', fieldset);
_super.prototype.addLabelDiv.call(_this, obsdateRowDiv, "Observation time (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-time' target='_blank'>here</a>");
var obsdateDiv = L.DomUtil.create('div', 'uk-form-controls uk-form-icon uk-width-1-1', obsdateRowDiv);
obsdateDiv.id = 'guide' + initials + 'date';
var obsdateIcon = L.DomUtil.create('span', 'uk-icon-calendar', obsdateDiv);
self.obsDateInput = L.DomUtil.create('input', 'uk-width-1-2', obsdateDiv);
self.obsDateInput.type = 'text';
self.obsDateInput.placeholder = self.dateFormat;
self.obsTimeInput = L.DomUtil.create('input', 'uk-width-1-2', obsdateDiv);
self.obsTimeInput.type = 'text';
self.obsDateInput.onchange = function () { self.fireChangeFn(self); };
self.obsTimeInput.onchange = function () { self.fireChangeFn(self); };
UIkit.ready(function () {
var startDatePicker = UIkit.datepicker(self.obsDateInput, { format: self.dateFormat });
var startTimePicker = UIkit.timepicker(self.obsTimeInput, {});
self.defaults();
});
return _this;
}
EXLocation.prototype.defaults = function () {
_super.prototype.defaults.call(this);
var self = this;
if (document.body.contains(self.obsDateInput)) {
if (self.obsDateInput.value == '') {
var initDate = moment.utc();
self.obsDateInput.value = initDate.format(self.dateFormat);
self.obsTimeInput.value = initDate.startOf('hour').format(self.timeFormat);
}
}
};
EXLocation.prototype.populateCard = function (geojson) {
var self = this;
_super.prototype.populateCard.call(this, geojson);
var simulation = geojson.features[0].properties.simulation;
var observation = geojson.features[0].properties.observation[0];
var datetime = simulation.startDate;
if (geojson.features[0].properties.observation.length > 0) {
var observation = geojson.features[0].properties.observation[0];
datetime = observation.date;
}
var date = moment.utc(datetime).format(self.dateFormat);
self.obsDateInput.value = date;
var time = moment.utc(datetime).format(self.timeFormat);
self.obsTimeInput.value = time;
self.fireChangeFn(this);
};
EXLocation.prototype.populateData = function (geojson) {
_super.prototype.populateData.call(this, geojson);
var self = this;
var observation = {
"id": null,
"provider": "USER",
"providerDataRef": null,
"providerImgRef": null,
"providerType": null,
"type": "MANUAL",
"date": moment.utc(self.obsDateInput.value + ' ' + self.obsTimeInput.value, self.datetimeFormat).valueOf()
};
geojson.features[0].properties["observation"] = [];
geojson.features[0].properties["observation"].push(observation);
};
return EXLocation;
}(STWkit.LocationCard));
var EXAmount = (function (_super) {
__extends(EXAmount, _super);
function EXAmount(id, parentDiv, lang, map, type, initials) {
var _this = this;
var amountDiv = L.DomUtil.create('div', 'uk-width-1-1 uk-margin-top', parentDiv);
_this = _super.call(this, id, 'Amount', parentDiv, amountDiv) || this;
var self = _this;
var form = L.DomUtil.create('form', 'uk-form uk-form-stacked', amountDiv);
form.setAttribute('novalidate', '');
form.onsubmit = function (e) {
e.preventDefault();
e.stopPropagation();
return false;
};
form.onkeypress = function (e) {
var key = e.charCode || e.keyCode || 0;
if (key == 13)
e.preventDefault();
};
function addOption(parent, value, txt) {
var option = L.DomUtil.create('option', '', parent);
option.value = value;
option.textContent = txt;
}
var fieldset = L.DomUtil.create('fieldset', '', form);
var amountRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
amountRowDiv.id = 'guide' + initials + 'amountvalue';
amountRowDiv.guideFn = function () {
self.amountInput.value = '10';
validate();
};
_super.prototype.addLabelDiv.call(_this, amountRowDiv, "Amount", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-amount' target='_blank'>here</a>");
var amountValueDiv = L.DomUtil.create('div', 'uk-width-1-1', amountRowDiv);
self.amountInput = L.DomUtil.create('input', 'uk-width-1-4', amountValueDiv);
self.amountInput.type = 'number';
self.amountInput.step = '10';
self.amountInput.min = '0';
var amountUnitDiv = L.DomUtil.create('div', 'uk-width-1-2 uk-form-select select', amountValueDiv);
amountUnitDiv.setAttribute('data-uk-form-select', '');
var selectedAmountUnit = L.DomUtil.create('span', '', amountUnitDiv);
self.amountSelect = L.DomUtil.create('select', '', amountUnitDiv);
addOption(self.amountSelect, 'm3', '');
addOption(self.amountSelect, 'tonnes', 'tonnes');
self.amountInput.onchange = function () {
validate();
};
function validate() {
var amountValue = parseInt(self.amountInput.value);
var amountOk = false;
if (amountValue > 0)
amountOk = true;
if (amountOk) {
self.status = true;
STWkit.AccordionCard.enableNext(self.nextButton, true);
(self.oncallback && self.oncallback());
}
else {
self.clear();
}
}
;
var clearDiv = L.DomUtil.create('div', 'uk-clearfix', amountDiv);
var clearButton = L.DomUtil.create('button', 'uk-button uk-margin-top uk-align-left', clearDiv);
clearButton.textContent = 'Clear';
clearButton.onclick = function () {
self.clear();
};
self.nextButton = L.DomUtil.create('button', 'uk-button uk-margin-top uk-align-right', clearDiv);
self.nextButton.id = 'guide' + initials + 'amount';
self.nextButton.textContent = 'Next';
self.nextButton.guideFn = function () {
self.nextButton.click();
};
STWkit.AccordionCard.enableNext(self.nextButton, false);
self.nextButton.onclick = function () {
if (!STWkit.AccordionCard.isEnabled(self.nextButton)) {
STWkit.AccordionCard.warningMsg('Mandatory fields missing', 'Specify a valid <b>amount</b>.');
return;
}
(self.oncallback && self.oncallback(true));
};
UIkit.ready(function () {
self.defaults();
});
return _this;
}
EXAmount.prototype.defaults = function () {
var self = this;
};
EXAmount.prototype.populateCard = function (geojson) {
var self = this;
var simulation = geojson.features[0].properties.simulation;
self.amountInput.value = simulation.amount;
var amountevt = document.createEvent('Event');
amountevt.initEvent("change", true, true);
self.amountInput.dispatchEvent(amountevt);
self.amountSelect.value = simulation.amountUnit;
};
EXAmount.prototype.populateData = function (geojson) {
var self = this;
geojson.features[0].properties["simulation"]["amount"] = self.amountInput.value;
geojson.features[0].properties["simulation"]["amountUnit"] = self.amountSelect.options[self.amountSelect.selectedIndex].value;
};
EXAmount.prototype.clear = function () {
var self = this;
_super.prototype.clear.call(this);
self.amountInput.value = '';
STWkit.AccordionCard.enableNext(self.nextButton, false);
self.status = false;
(self.oncallback && self.oncallback());
};
return EXAmount;
}(STWkit.AccordionCard));
//# sourceMappingURL=leaflet-exercise-cards.js.map
/// <reference path="def/uikit.d.ts" />
/// <reference path="def/leaflet.d.ts" />
/// <reference path="def/introJs.d.ts" />
/// <reference path="def/stwkit.d.ts" />
/// <reference path="def/moment.d.ts" />
/// <reference path="def/reqwest.d.ts" />
/// <reference path="leaflet-exercise-cards.ts" />
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var L;
(function (L) {
var Control;
(function (Control) {
var Exercise = (function (_super) {
__extends(Exercise, _super);
function Exercise(options) {
var _this = _super.call(this, options) || this;
_this.type = 'oil';
_this.subtype = 'instant';
_this.name = 'exercise';
_this.initials = 'ex';
if (options.obs) {
_this.obs = options.obs;
}
return _this;
}
Exercise.prototype.setup = function (map) {
var _this = this;
var self = this;
this.container = L.DomUtil.create('div', self.name + '-control');
this.accordionDiv = L.DomUtil.create('div', 'uk-accordion', this.container);
var locationid = self.initials + 'locationCard';
self.cardMap[locationid] = new EXLocation(locationid, this.accordionDiv, self.lang, self.langData, map, self.forcing, self.obs, self.type, self.initials);
self.cardMap[locationid].show();
var periodid = self.initials + 'periodCard';
var periodoptions = {};
periodoptions['type'] = this.type;
periodoptions['initials'] = this.initials;
self.cardMap[periodid] = new STWkit.PeriodCard(periodid, 'Simulation period', this.accordionDiv, self.lang, map, self.domain, self.forcingmodel, periodoptions);
var oiltypeoptions = {};
oiltypeoptions['type'] = this.type;
oiltypeoptions['initials'] = this.initials;
var oiltypeid = self.initials + 'typeCard';
self.cardMap[oiltypeid] = new STWkit.OilTypeCard(oiltypeid, 'Type of oil', this.accordionDiv, self.lang, map, oiltypeoptions);
this.cardMap[periodid].addChangeFnListener(this.cardMap[oiltypeid]);
var amountid = self.initials + 'amountCard';
self.cardMap[amountid] = new EXAmount(amountid, this.accordionDiv, self.lang, map, self.type, self.initials);
this.cardMap[locationid].addChangeFnListener(this.cardMap[periodid]);
_super.prototype.setup.call(this, map);
var chain = [];
chain[locationid] = periodid;
chain[periodid] = oiltypeid;
chain[oiltypeid] = amountid;
chain[amountid] = '';
self.cardMap[locationid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, locationid, gonext);
};
self.cardMap[periodid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, periodid, gonext);
};
self.cardMap[oiltypeid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, oiltypeid, gonext);
};
self.cardMap[amountid].oncallback = function (gonext) {
_super.prototype.callback.call(_this, chain, amountid, gonext);
};
};
Exercise.prototype.ready = function (name) {
_super.prototype.ready.call(this, name);
};
Exercise.prototype.clear = function () {
_super.prototype.clear.call(this);
};
Exercise.prototype.show = function () {
};
Exercise.prototype.hide = function () {
this.clear();
};
return Exercise;
}(STWkit.CardControl));
Control.Exercise = Exercise;
})(Control = L.Control || (L.Control = {}));
})(L || (L = {}));
//# sourceMappingURL=leaflet-exercise-control.js.map
\ No newline at end of file
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/// <reference path="def/moment.d.ts" /> /// <reference path="def/moment.d.ts" />
/// <reference path="def/leaflet-forcing-boundary.d.ts" /> /// <reference path="def/leaflet-forcing-boundary.d.ts" />
/// <reference path="def/reqwest.d.ts" /> /// <reference path="def/reqwest.d.ts" />
/// <reference path="leaflet-observation-sat.ts" />
var __extends = (this && this.__extends) || (function () { var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf || var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
...@@ -49,6 +48,7 @@ var EXLocation = (function (_super) { ...@@ -49,6 +48,7 @@ var EXLocation = (function (_super) {
geojson.features[0].properties["observation"].push(observation); geojson.features[0].properties["observation"].push(observation);
geojson.features[0].properties["simulation"] = {}; geojson.features[0].properties["simulation"] = {};
self.populateCard(geojson); self.populateCard(geojson);
satdetectionHide();
}; };
function legendBox(fieldset, color, text, size) { function legendBox(fieldset, color, text, size) {
var rowDiv = L.DomUtil.create('div', 'uk-form-row uk-margin-remove', fieldset); var rowDiv = L.DomUtil.create('div', 'uk-form-row uk-margin-remove', fieldset);
...@@ -71,20 +71,30 @@ var EXLocation = (function (_super) { ...@@ -71,20 +71,30 @@ var EXLocation = (function (_super) {
self.satDetectionChevronIcon = L.DomUtil.create('span', 'uk-icon-chevron-down chevron-icon', satDetectionHeading); self.satDetectionChevronIcon = L.DomUtil.create('span', 'uk-icon-chevron-down chevron-icon', satDetectionHeading);
self.satDetectionContent = L.DomUtil.create('div', 'uk-animation-fade', satDetectionItem); self.satDetectionContent = L.DomUtil.create('div', 'uk-animation-fade', satDetectionItem);
self.satDetectionContent.style.display = 'none'; self.satDetectionContent.style.display = 'none';
satDetectionHeading.onclick = function (evt) { var satdetectionShow = function () {
if (self.satDetectionChevronIcon.classList.contains('uk-icon-chevron-down')) { if (self.satDetectionChevronIcon.classList.contains('uk-icon-chevron-down')) {
self.satDetectionChevronIcon.classList.remove('uk-icon-chevron-down'); self.satDetectionChevronIcon.classList.remove('uk-icon-chevron-down');
self.satDetectionChevronIcon.classList.add('uk-icon-chevron-up'); self.satDetectionChevronIcon.classList.add('uk-icon-chevron-up');
self.satDetectionContent.style.display = ""; self.satDetectionContent.style.display = "";
self.satObs.show(); self.satObs.show();
} }
else { };
var satdetectionHide = function () {
if (self.satDetectionChevronIcon.classList.contains('uk-icon-chevron-up')) {
self.satDetectionChevronIcon.classList.remove('uk-icon-chevron-up'); self.satDetectionChevronIcon.classList.remove('uk-icon-chevron-up');
self.satDetectionChevronIcon.classList.add('uk-icon-chevron-down'); self.satDetectionChevronIcon.classList.add('uk-icon-chevron-down');
self.satDetectionContent.style.display = 'none'; self.satDetectionContent.style.display = 'none';
self.satObs.hide(); self.satObs.hide();
} }
}; };