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

157
Views
Interactjs: error aleatorio: TypeError: no se pueden leer las propiedades de undefined (leyendo 'izquierda')

Estoy usando interact.js en mi proyecto Ionic + Vue. Tengo una pantalla donde hay un círculo en la pantalla cuando se arrastra, se clona en el elemento principal. El código se muestra a continuación. Esto funciona la mayor parte del tiempo en el navegador real (no al 100%). Pero en mi móvil siempre me sale este extraño error y no entiendo por qué. Traté de averiguar por qué y de dónde viene. Rastreé el error hasta esta línea de código:

 interaction.start({ name: "drag" }, event.interactable, element);
 .on('move', dragOrClone); // this function that cases error is called on this line of global interact instance const dragOrClone = (event) => { const { currentTarget, interaction } = event; let element = currentTarget; if( interaction.pointerIsDown && !interaction.interacting() && currentTarget.style.transform === "" ) { element = currentTarget.cloneNode(true); element.style.position = "absolute"; element.style.left = 0; element.style.top = 0; element.style.width = '24px'; element.style.height = '24px'; element.style.transform = 'translate(0px, 0px)'; element.classList.remove('bg-yellow-800'); element.classList.add('bg-yellow-600'); // Adding object inside parent container element dropzone && dropzone.appendChild(element); position.x = 0; position.y = 0; // If we are moving an already existing item, we need to make sure the position object has // the correct values before we start dragging it }else if( interaction.pointerIsDown && !interaction.interacting() ) { updatePositionFromTransform(currentTarget); } // Start the drag event interaction.start({ name: "drag" }, event.interactable, element); };

Editar: también este círculo que se usa para clonar a otros no tiene valor de transformación, por lo que si la declaración de qué objeto clonado puede ser verdadera. Pero cuando me transformo en él, no veo este error, pero esto rompe mi intención de clonar el objeto.

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!