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

140
Visualizações
The minus and plus buttons work but get stuck

The buttons should move a few arrows to the right and left I choose in the check box which arrow I want and then it should move each time + or - 20 degrees so that the breasts rotate. The buttons work but they get stuck and the arrows do not move smoothly.

curretnAngle is a new angle that I compare to each arrow and its angles and then in the second function I change it to 20 degrees each time


  const handleChange=(e)=>{
    let curretnAngle;
    if (props.selectedButton=='turret') {
      console.log(props.selectedButton);
      curretnAngle = props.angleTurret
       console.log(props.angleTurret, curretnAngle);
    }
    else if (props.selectedButton=='lazer') {
       curretnAngle= props.angleLazer
    } 
    else{
      curretnAngle = props.radanglee
    }
   
  
   
    switch (e.target.name){
      case 'minus':
        console.log(curretnAngle,props.selectedButton);
          props.handlerotat(curretnAngle-20)
          console.log('minus')
          break;
        case 'plus':
        console.log(curretnAngle,props.selectedButton);
          props.handlerotate(curretnAngle+20)
          console.log('plus')
          break;
    }
const handlerotate=(newAngle)=>{
 switch (selectedButton) {
   case 'turret':
     setAngleTurret(newAngle)
     break;
   case 'lazer':
     setAngleLazer(newAngle)
      break;
   case 'lezerr':
     setAnglerad(newAngle)
     break;
 }
}
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