mirror of
https://github.com/Merricx/qrazybox.git
synced 2025-02-16 15:02:57 +01:00
Update view resizing precision
This commit is contained in:
parent
8dd33360de
commit
e9a7e7dc24
1 changed files with 19 additions and 3 deletions
22
js/main.js
22
js/main.js
|
@ -21,6 +21,7 @@ var fill_painter = false; //Is flood fill tool active?
|
||||||
var changed_state = false; //Is document in changed state and not saved yet?
|
var changed_state = false; //Is document in changed state and not saved yet?
|
||||||
|
|
||||||
var show_grey = true; //Show grey modules in Decode mode
|
var show_grey = true; //Show grey modules in Decode mode
|
||||||
|
var extract_info_mode = false; //Is Extract QR Information active?
|
||||||
var brute_force_mode = false; //Is Brute-force Format Info active?
|
var brute_force_mode = false; //Is Brute-force Format Info active?
|
||||||
var analysis_mode = false; //Is Data Analysis tool active?
|
var analysis_mode = false; //Is Data Analysis tool active?
|
||||||
|
|
||||||
|
@ -683,6 +684,12 @@ function clearHistory(){
|
||||||
$(".history").html("");
|
$(".history").html("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
*
|
||||||
|
* Display information text result in Extract QR Information tool and
|
||||||
|
* load it to #div-extract
|
||||||
|
*
|
||||||
|
***/
|
||||||
function extractInfo(){
|
function extractInfo(){
|
||||||
|
|
||||||
var data_array = JSON.stringify(qr_array);
|
var data_array = JSON.stringify(qr_array);
|
||||||
|
@ -1335,6 +1342,7 @@ $(document).ready(function(){
|
||||||
$("#btn-tools-extract").trigger("click");
|
$("#btn-tools-extract").trigger("click");
|
||||||
}
|
}
|
||||||
brute_force_mode = false;
|
brute_force_mode = false;
|
||||||
|
extract_info_mode = false;
|
||||||
if(analysis_mode){
|
if(analysis_mode){
|
||||||
$("#tools-data-analysis").trigger("click");
|
$("#tools-data-analysis").trigger("click");
|
||||||
}
|
}
|
||||||
|
@ -1491,8 +1499,10 @@ $(document).ready(function(){
|
||||||
})
|
})
|
||||||
|
|
||||||
$("#btn-size-plus").click(function(){
|
$("#btn-size-plus").click(function(){
|
||||||
if(qr_pixel_size != 50){
|
if(qr_pixel_size != 50 && qr_pixel_size >= 10){
|
||||||
qr_pixel_size += 5;
|
qr_pixel_size += 5;
|
||||||
|
} else if(qr_pixel_size < 10){
|
||||||
|
qr_pixel_size += 1;
|
||||||
}
|
}
|
||||||
$("#qr-size").val(qr_pixel_size+"px");
|
$("#qr-size").val(qr_pixel_size+"px");
|
||||||
resize(qr_pixel_size);
|
resize(qr_pixel_size);
|
||||||
|
@ -1501,8 +1511,10 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
$("#btn-size-min").click(function(){
|
$("#btn-size-min").click(function(){
|
||||||
if(qr_pixel_size != 5){
|
if(qr_pixel_size > 10){
|
||||||
qr_pixel_size -= 5;
|
qr_pixel_size -= 5;
|
||||||
|
} else if(qr_pixel_size != 1){
|
||||||
|
qr_pixel_size -= 1;
|
||||||
}
|
}
|
||||||
$("#qr-size").val(qr_pixel_size+"px");
|
$("#qr-size").val(qr_pixel_size+"px");
|
||||||
resize(qr_pixel_size);
|
resize(qr_pixel_size);
|
||||||
|
@ -1567,6 +1579,7 @@ $(document).ready(function(){
|
||||||
$("body").css("background-color","#fff");
|
$("body").css("background-color","#fff");
|
||||||
$(this).addClass("active");
|
$(this).addClass("active");
|
||||||
extractInfo();
|
extractInfo();
|
||||||
|
extract_info_mode = true;
|
||||||
})
|
})
|
||||||
|
|
||||||
$("#btn-extract-show-rs, #btn-extract-show-error").click(function(){
|
$("#btn-extract-show-rs, #btn-extract-show-error").click(function(){
|
||||||
|
@ -1601,6 +1614,7 @@ $(document).ready(function(){
|
||||||
} else {
|
} else {
|
||||||
$("#box-tools-analysis").hide();
|
$("#box-tools-analysis").hide();
|
||||||
}
|
}
|
||||||
|
extract_info_mode = false;
|
||||||
})
|
})
|
||||||
|
|
||||||
/****************************
|
/****************************
|
||||||
|
@ -2204,7 +2218,9 @@ $(document).ready(function(){
|
||||||
if(document.body.clientWidth > 900){
|
if(document.body.clientWidth > 900){
|
||||||
$("#header-menu").css({"display":""});
|
$("#header-menu").css({"display":""});
|
||||||
$(".left-box").css({"left":"","display":""});
|
$(".left-box").css({"left":"","display":""});
|
||||||
$(".right-box").css({"right":"","display":""});
|
if(!extract_info_mode){
|
||||||
|
$(".right-box").css({"right":"","display":""});
|
||||||
|
}
|
||||||
$(".float-nav, .menu-bar").removeClass("active");
|
$(".float-nav, .menu-bar").removeClass("active");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue