Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

121
Visualizações
Method to detect marker at pixel level

I am trying to create a marker as an overlay over the website. The marker I am using now is an HTML div are 3, 1 pixel sized blocks.

<div style="position: fixed; top:10vh; left:90vw; z-index: 99999;">
    <div style="width: 1px; height: 1px; background: rgb(0, 255, 0);"></div>
    <div style="width: 1px; height: 1px; background: rgb(255, 0, 255);"></div>
    <div style="width: 1px; height: 1px; background: rgb(255, 0, 0);"></div>
</div>

And I am trying to detect the same with help of

for (row in imageArr) {
        for (col in imageArr[row]) {
            if( JSON.stringify(imageArr[row][col]) == JSON.stringify(alignments[0]) ) {
                console.log( "1" );
                if( JSON.stringify(imageArr[parseInt(row)+1][col]) == JSON.stringify(alignments[1]) ) {
                    console.log( "2" );
                    if( JSON.stringify(imageArr[parseInt(row)+2][col]) == JSON.stringify(alignments[2]) ) {
                        console.log( "3" );
                        alignments_loc.push([row,col]);
                    } else if( JSON.stringify(imageArr[parseInt(row)+2][col]) == JSON.stringify(alignments[1]) ) { // If the second one repeats twice
                        console.log( "3" ); 
                        if( JSON.stringify(imageArr[parseInt(row)+3][col]) == JSON.stringify(alignments[2]) ) {
                            console.log( "4" );
                            alignments_loc.push([row,col]);
                        }
                    }
                }
            }
        }
    }

But it works only on certain screens, and when I test on mobile or other it fails, could you please tell how can I fix it? So that the marker can be read.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda