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

142
Views
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
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!