Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Método para detectar marcador a nivel de píxel

Estoy tratando de crear un marcador como una superposición sobre el sitio web. El marcador que estoy usando ahora es un div HTML con 3 bloques de 1 píxel.

 <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>

Y estoy tratando de detectar lo mismo con la ayuda de

 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]); } } } } } }

Pero solo funciona en ciertas pantallas, y cuando pruebo en el móvil u otro falla, ¿podría decirme cómo puedo solucionarlo? Para que se pueda leer el marcador.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!