Commit ce282281 authored by José Luis Uc's avatar José Luis Uc

Merge branch 'dev' of gitlab.geoint.mx:mario.chirinos/GeoInt_SIDT into dev

parents 0eafbbe9 478665c6
......@@ -187,16 +187,24 @@
<i class="fa fa-cloud"></i>
<span>Cloud percentage</span>
<span class="pull-right-container">
<span class="label label-primary pull-right"></span>
</span>
</a>
<ul class="treeview-menu sidebar-form">
<li>
<input class="form-text" id="clouds" value="5" oninput="setCloudPercentageSlider(this.value)" name="cloudPercentage" disabled>
<input class="cross-range" type="range" min="0" max="100" step="1" value="5" oninput="setCloudPercentage(this.value)" id="cloudPercentageSelector" name=cloudPercentage>
<span class="label label-primary pull-right"></span>
</span>
</a>
<ul class="treeview-menu sidebar-form">
<li>
<div class="row">
<div class="col-lg-9" style="padding-top: 5px;">
<input class="cross-range" type="range" min="0" max="100" step="1" value="5" oninput="setCloudPercentage(this.value)"
id="cloudPercentageSelector" name="cloudPercentage">
</div>
<div class="col-lg-3" style="padding-left:0px;padding-top: 5px;">
<!-- <input class="form-text" id="clouds" value="5" oninput="setCloudPercentageSlider(this.value)" name="cloudPercentage" disabled> -->
<span id="clouds">5</span>
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#"><div class="modal"><!-- Place at bottom of page --></div>
<span>
......@@ -328,7 +336,8 @@
function setCloudPercentage(clouds) {
//console.log(clouds)
document.getElementById("clouds").value=clouds;
//document.getElementById("clouds").value = clouds;
document.getElementById("clouds").innerHTML=clouds;
}
function setCloudPercentageSlider(clouds) {
//console.log(clouds)
......
......@@ -145,11 +145,32 @@ function change(newType) {
// Remove the old chart and all its event handles
if (myChart) {
myChart.destroy();
}
// Chart.js modifies the object you pass in. Pass a copy of the object so we can use the original object later
// -------------- set last values when the chart was destroyed ------
let selectedLayers = getSelectedLayersName().map( layerName => {
const layerCheckbox = $(':checkbox[value='+layerName+']');
return layerCheckbox.parent().attr('id')
});
selectedLayers = selectedLayers.filter(layerId => layerId!=null);
selectedLayers = selectedLayers.map(layerId => layerId.replace('sclcheck-', '').replace('-', ' '));
config.data.datasets.forEach(data => {
const label = data.label.toLowerCase().replace('-', ' ');
data.hidden = true;
if (selectedLayers.includes(label)) {
data.hidden = false;
}
})
// -------------------------------------------------------------------
var temp = jQuery.extend(true, {}, config);
if (newType == "stackedBar"){
temp.type = "bar";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment