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):
#-----------------------------------------------
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:
"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))
"b" - (int / long) El tamaño original en bytes
"b" - (int / long) El tamano original en bytes
"""
for exp in range(0, 90 , 10):
......
......@@ -26,11 +26,36 @@ body
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 {
position: absolute;
width: auto;
height: auto;
overflow:hidden;
z-index: 2;
}
.img-comp-img img {
......
......@@ -13,9 +13,6 @@ var reportImg = activePoints[0];
// mostrar imagen al dar click en los puntos
document.getElementById("myChart").onclick = function (evt) {
if (slider != false) {
deleteComparisons()
}
stop();
console.log("on click")
......@@ -45,8 +42,6 @@ document.getElementById("myChart").onclick = function (evt) {
});
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(firstPoint);
//alert("{{ IMAGE_PATH }}"+label+"_TCI_60m.jpg");
......@@ -63,10 +58,6 @@ function play() {
// $(".next").hide();
// $(".prev").hide();
// $("#showImage").addClass('col-lg-offset-1');
if (slider == false) {
document.getElementById("titleMap").innerHTML = oldLabel + " vs " + oldLabel;
initComparisons()
}
playImages = setInterval(function () { next(); }, 4000);
}
......@@ -129,11 +120,8 @@ function updateImage(imagePoint) {
label = imagePoint;
reportImg = imagePoint;
titleLabel = label.slice(0, 4) + "/" + label.slice(4, 6) + "/" + label.slice(6);
if (slider != false) {
document.getElementById("titleMap").innerHTML = oldLabel + " vs " + titleLabel;
}else{
document.getElementById("titleMap").innerHTML = titleLabel;
}
document.getElementById("titleSCL").innerHTML = titleLabel
document.getElementById("satImage").src = "../../static/reports/tmpImages/repsat_test_dev/" + image_path + label + "_TCI_60m.jpg"
......@@ -175,11 +163,11 @@ function change(newType) {
let img, imgWidth=0, slider=false, clicked=0;
function initComparisons() {
$("#showSecondImage").show()
setTimeout(function() {
// $("#showSecondImage").show()
// setTimeout(function() {
img = document.getElementsByClassName("img-comp-overlay")[0];
compareImages(img);
});
//});
// setTimeout(function(){
// img = document.getElementsByClassName("img-comp-overlay")[0];
// compareImages(img);
......@@ -195,7 +183,7 @@ function compareImages(img) {
img.style.width = ((imgWidth / 2)) + 15 + "px";
/*create slider:*/
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*/
img.parentElement.insertBefore(slider, img);
/*position the slider in the middle:*/
......@@ -266,9 +254,44 @@ function deleteComparisons(){
window.removeEventListener("mousemove", slideMove);
window.removeEventListener("touchmove", slideMove);
$(".img-comp-slider").remove();
$("#showSecondImage").hide()
slider= false;
}
//deleteComparisons();
//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 @@
</span>
</a>
</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>
</li>
<li>
......
This diff is collapsed.
......@@ -320,13 +320,13 @@ def to_if(name):
# -----------------------------------------------
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:
"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))
"b" - (int / long) El tamaño original en bytes
"b" - (int / long) El tamano original en bytes
"""
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