Commit f56c858f authored by Emmanuel René Huchim Puc's avatar Emmanuel René Huchim Puc

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

parents 0ff150d6 41381b9b
...@@ -231,13 +231,13 @@ def to_if(name): ...@@ -231,13 +231,13 @@ def to_if(name):
#----------------------------------------------- #-----------------------------------------------
def best_unit_size(bytes_size): def best_unit_size(bytes_size):
""" """
Obtenga un tamaño en bytes y conviértalo en el mejor prefijo IEC para facilitar la lectura. Obtenga un tamano en bytes y conviertalo en el mejor prefijo IEC para facilitar la lectura.
Devuelva un diccionario con tres pares de claves / valores: Devuelva un diccionario con tres pares de claves / valores:
"s" - (flotador) Tamaño del camino convertido a la mejor unidad para una fácil lectura "s" - (flotador) Tamano del camino convertido a la mejor unidad para una facil lectura
"u" - (str) El prefijo (IEC) para s (de bytes (2 ^ 0) a YiB (2 ^ 80)) "u" - (str) El prefijo (IEC) para s (de bytes (2 ^ 0) a YiB (2 ^ 80))
"b" - (int / long) El tamaño original en bytes "b" - (int / long) El tamano original en bytes
""" """
for exp in range(0, 90 , 10): for exp in range(0, 90 , 10):
...@@ -249,4 +249,4 @@ def best_unit_size(bytes_size): ...@@ -249,4 +249,4 @@ def best_unit_size(bytes_size):
return str(round(bu_size,2))+" "+unit return str(round(bu_size,2))+" "+unit
#------------------------------------------------ #------------------------------------------------
\ No newline at end of file
...@@ -26,11 +26,36 @@ body ...@@ -26,11 +26,36 @@ body
height: 550px; /*should be the same height as the images*/ height: 550px; /*should be the same height as the images*/
} }
.listImg{
z-index: 4;
}
.listImg ul{
list-style: none;
padding: 0px;
margin: 0px;
cursor: pointer;
}
.listImg ul li:hover{
background: #87CEFA;
}
.listImg ul .active{
color:red
}
.list {
max-height: 220px;
overflow: auto;
}
.img-comp-img { .img-comp-img {
position: absolute; position: absolute;
width: auto; width: auto;
height: auto; height: auto;
overflow:hidden; overflow:hidden;
z-index: 2;
} }
.img-comp-img img { .img-comp-img img {
......
...@@ -13,9 +13,6 @@ var reportImg = activePoints[0]; ...@@ -13,9 +13,6 @@ var reportImg = activePoints[0];
// mostrar imagen al dar click en los puntos // mostrar imagen al dar click en los puntos
document.getElementById("myChart").onclick = function (evt) { document.getElementById("myChart").onclick = function (evt) {
if (slider != false) {
deleteComparisons()
}
stop(); stop();
console.log("on click") console.log("on click")
...@@ -45,8 +42,6 @@ document.getElementById("myChart").onclick = function (evt) { ...@@ -45,8 +42,6 @@ document.getElementById("myChart").onclick = function (evt) {
}); });
var imagePoint = activePoints[imageNumber]; var imagePoint = activePoints[imageNumber];
oldLabel = label.slice(0, 4) + "/" + label.slice(4, 6) + "/" + label.slice(6);
document.getElementById("satImageSecond").src = "../../static/reports/tmpImages/repsat_test_dev/" + image_path + label + "_TCI_60m.jpg"
updateImage(imagePoint); updateImage(imagePoint);
//updateImage(firstPoint); //updateImage(firstPoint);
//alert("{{ IMAGE_PATH }}"+label+"_TCI_60m.jpg"); //alert("{{ IMAGE_PATH }}"+label+"_TCI_60m.jpg");
...@@ -62,11 +57,7 @@ function play() { ...@@ -62,11 +57,7 @@ function play() {
$("#stop").show(); $("#stop").show();
// $(".next").hide(); // $(".next").hide();
// $(".prev").hide(); // $(".prev").hide();
// $("#showImage").addClass('col-lg-offset-1'); // $("#showImage").addClass('col-lg-offset-1');
if (slider == false) {
document.getElementById("titleMap").innerHTML = oldLabel + " vs " + oldLabel;
initComparisons()
}
playImages = setInterval(function () { next(); }, 4000); playImages = setInterval(function () { next(); }, 4000);
} }
...@@ -129,12 +120,9 @@ function updateImage(imagePoint) { ...@@ -129,12 +120,9 @@ function updateImage(imagePoint) {
label = imagePoint; label = imagePoint;
reportImg = imagePoint; reportImg = imagePoint;
titleLabel = label.slice(0, 4) + "/" + label.slice(4, 6) + "/" + label.slice(6); titleLabel = label.slice(0, 4) + "/" + label.slice(4, 6) + "/" + label.slice(6);
if (slider != false) { document.getElementById("titleMap").innerHTML = titleLabel;
document.getElementById("titleMap").innerHTML = oldLabel + " vs " + titleLabel; document.getElementById("titleSCL").innerHTML = titleLabel
}else{
document.getElementById("titleMap").innerHTML = titleLabel;
}
document.getElementById("satImage").src = "../../static/reports/tmpImages/repsat_test_dev/" + image_path + label + "_TCI_60m.jpg" document.getElementById("satImage").src = "../../static/reports/tmpImages/repsat_test_dev/" + image_path + label + "_TCI_60m.jpg"
document.getElementById("scl_saturated").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_saturated.png" document.getElementById("scl_saturated").src = "../../static/reports/tmpImages/repsat_test_dev/" + scl_path + label + "_SCL_60m_saturated.png"
...@@ -175,11 +163,11 @@ function change(newType) { ...@@ -175,11 +163,11 @@ function change(newType) {
let img, imgWidth=0, slider=false, clicked=0; let img, imgWidth=0, slider=false, clicked=0;
function initComparisons() { function initComparisons() {
$("#showSecondImage").show() // $("#showSecondImage").show()
setTimeout(function() { // setTimeout(function() {
img = document.getElementsByClassName("img-comp-overlay")[0]; img = document.getElementsByClassName("img-comp-overlay")[0];
compareImages(img); compareImages(img);
}); //});
// setTimeout(function(){ // setTimeout(function(){
// img = document.getElementsByClassName("img-comp-overlay")[0]; // img = document.getElementsByClassName("img-comp-overlay")[0];
// compareImages(img); // compareImages(img);
...@@ -195,7 +183,7 @@ function compareImages(img) { ...@@ -195,7 +183,7 @@ function compareImages(img) {
img.style.width = ((imgWidth / 2)) + 15 + "px"; img.style.width = ((imgWidth / 2)) + 15 + "px";
/*create slider:*/ /*create slider:*/
slider = document.createElement("DIV"); slider = document.createElement("DIV");
slider.setAttribute("class", "img-comp-slider col-lg-offset-1 col-md-offset-1 col-xs-offset-2"); slider.setAttribute("class", "img-comp-slider col-lg-offset-2 col-md-offset-2 col-xs-offset-2");
/*insert slider*/ /*insert slider*/
img.parentElement.insertBefore(slider, img); img.parentElement.insertBefore(slider, img);
/*position the slider in the middle:*/ /*position the slider in the middle:*/
...@@ -266,9 +254,44 @@ function deleteComparisons(){ ...@@ -266,9 +254,44 @@ function deleteComparisons(){
window.removeEventListener("mousemove", slideMove); window.removeEventListener("mousemove", slideMove);
window.removeEventListener("touchmove", slideMove); window.removeEventListener("touchmove", slideMove);
$(".img-comp-slider").remove(); $(".img-comp-slider").remove();
$("#showSecondImage").hide()
slider= false; slider= false;
} }
//deleteComparisons(); //deleteComparisons();
//initComparisons(); //initComparisons();
function selectImage1(date, element) {
$("#imageListFirst li").removeClass("active");
element.classList.add("active");
let label = date.toString();
label = label.slice(0, 4) + "/" + label.slice(4, 6) + "/" + label.slice(6);
document.getElementById("titleImageFirst").innerHTML = label;
document.getElementById("satImageFirst").src = "../../static/reports/tmpImages/repsat_test_dev/" + image_path + date + "_TCI_60m.jpg"
}
function selectImage2(date,element) {
$("#imageListSecond li").removeClass("active");
element.classList.add("active");
let label = date.toString();
label = label.slice(0, 4) + "/" + label.slice(4, 6) + "/" + label.slice(6);
document.getElementById("titleImageSecond").innerHTML = label;
document.getElementById("satImageSecond").src = "../../static/reports/tmpImages/repsat_test_dev/" + image_path + date + "_TCI_60m.jpg"
}
$('.nav-tabs a').on('shown.bs.tab', function (evt) {
let tab = $(evt.target).text();
if(tab == "Comparison"){
initComparisons()
}
});
$('.nav-tabs a').on('hide.bs.tab', function (evt) {
let tab = $(evt.target).text();
if (tab == "Comparison") {
deleteComparisons();
}
if (tab == "Images") {
stop();
}
});
This diff is collapsed.
...@@ -135,6 +135,15 @@ ...@@ -135,6 +135,15 @@
</span> </span>
</a> </a>
</li> </li>
<li>
<a class="treeview submenu" href="../../static/reports/tmpImages/repsat_test_dev/{{ request.user.email }}/{{ purchaseID }}/{{ zone }}.pdf" id="downloadPdf">
<i class="fa fa-file-pdf-o"></i>
<span>Export to PDF v2</span>
<span class="pull-right-container">
<span class="label label-primary pull-right"></span>
</span>
</a>
</li>
</ul> </ul>
</li> </li>
<li> <li>
......
This diff is collapsed.
...@@ -320,13 +320,13 @@ def to_if(name): ...@@ -320,13 +320,13 @@ def to_if(name):
# ----------------------------------------------- # -----------------------------------------------
def best_unit_size(bytes_size): def best_unit_size(bytes_size):
""" """
Obtenga un tamaño en bytes y conviértalo en el mejor prefijo IEC para facilitar la lectura. Obtenga un tamano en bytes y conviertalo en el mejor prefijo IEC para facilitar la lectura.
Devuelva un diccionario con tres pares de claves / valores: Devuelva un diccionario con tres pares de claves / valores:
"s" - (flotador) Tamaño del camino convertido a la mejor unidad para una fácil lectura "s" - (flotador) Tamano del camino convertido a la mejor unidad para una facil lectura
"u" - (str) El prefijo (IEC) para s (de bytes (2 ^ 0) a YiB (2 ^ 80)) "u" - (str) El prefijo (IEC) para s (de bytes (2 ^ 0) a YiB (2 ^ 80))
"b" - (int / long) El tamaño original en bytes "b" - (int / long) El tamano original en bytes
""" """
for exp in range(0, 90, 10): for exp in range(0, 90, 10):
......
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