-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved Az and El display for ATDome MTDome and TMA #414
Conversation
render() { | ||
const { className, height, width, currentValue, targetValue, radius, valueOrigin, displayLabels } = this.props; | ||
|
||
//const {currentValue, targetValue} = this.state; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be removed
|
||
> | ||
|
||
{/* Ritate Center */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be Rotate
className={styles.targetText} | ||
> | ||
<text | ||
//transform={`${"translate("+currentText_X+" "+currentText_Y+")"}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be removed
setInterval(() => { | ||
const randomValue = Math.ceil(Math.random()*360) | ||
|
||
this.setState((prevState) => ({ | ||
...prevState,targetValue: randomValue | ||
})) | ||
|
||
setTimeout(() => console.log(this.setState((prevState) => ({ | ||
...prevState,currentValue: randomValue | ||
}))), 2500); | ||
|
||
}, 5000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these lines should be removed as they are only setting random values
setInterval(() => { | ||
const randomValue = Math.ceil(Math.random()*130-20) | ||
|
||
this.setState((prevState) => ({ | ||
...prevState,targetValue: randomValue | ||
})) | ||
|
||
setTimeout(() => console.log(this.setState((prevState) => ({ | ||
...prevState,currentValue: randomValue | ||
}))), 2500); | ||
|
||
}, 5000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained above, this should be removed too
transform={`${"rotate("+(currentValue*-1)+")"}`} | ||
> | ||
<text | ||
//transform={`${"translate("+currentText_X+" "+currentText_Y+")"}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be removed
setInterval(() => { | ||
const randomValue = Math.ceil((Math.random()*((2*270))-270)) | ||
|
||
this.setState((prevState) => ({ | ||
...prevState,targetValue: randomValue | ||
})) | ||
|
||
setTimeout(() => console.log(this.setState((prevState) => ({ | ||
...prevState,currentValue: randomValue | ||
}))), 2500); | ||
|
||
}, 5000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained above these lines should be removed too
render() { | ||
const {currentValue, targetValue, height, maxL3, maxL2, maxL1, minL1, minL2, minL3, radius, rotationOffset, displayLabels } = this.props; | ||
|
||
//const {currentValue, targetValue} = this.state; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice job @MiaRoseElbo 👏. I've left a few minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job @MiaRoseElbo . This is ready to merge 👍️
b6d6759
to
39d8ebb
Compare
This PR contains improvements for Az and EL displays for ATDome, MTDome and TMA.
Created a new Elevation and Azimuth General Purpose components instanced in both the AT and MT Dome components and in the TMA component.
Created a unique Az display for the TMA.