mirror of
https://github.com/Merricx/qrazybox.git
synced 2025-04-19 17:49:04 +02:00
fix styling
This commit is contained in:
parent
419f7cb342
commit
42cfcdcb49
1 changed files with 19 additions and 27 deletions
10
js/qr.js
10
js/qr.js
|
@ -208,19 +208,15 @@ var version_information_table_bit = [
|
|||
];
|
||||
|
||||
function add_version_info(t, version){
|
||||
|
||||
if (version >= 7) {
|
||||
for (step=0 ; step < 3 ; step++ )
|
||||
{
|
||||
for (step=0 ; step < 3 ; step++ ){
|
||||
x=0;
|
||||
for(let i = 17 - step; i>=0 ; i -= 3){
|
||||
// Bottom Left
|
||||
draw_square(t, 4*version + 6 + step, x ,1, version_information_table_bit[version - 7][i]);
|
||||
// Top Right
|
||||
draw_square(t, x, 4*version + 6 + step ,1, version_information_table_bit[version - 7][i]);
|
||||
|
||||
x++;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -229,10 +225,8 @@ function add_version_info(t, version){
|
|||
|
||||
// https://www.thonky.com/qr-code-tutorial/format-version-information
|
||||
function add_dark_module(t, version){
|
||||
|
||||
//dark module is always (8, 4*version + 9)
|
||||
draw_square(t, 4*version + 9, 8 ,1, BLACK_COLOR);
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
|
@ -262,8 +256,6 @@ function generate_qr(version){
|
|||
generate_timing_pattern_h(t, 8, 6, x_max-9);
|
||||
|
||||
add_alignment_patterns(t, version-1);
|
||||
|
||||
|
||||
add_dark_module(t,version);
|
||||
add_version_info(t,version);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue