Merge pull request #7982 from capilkey/fix-wb-toolbar

Make sure the whiteboard toolbar exists first before animating
This commit is contained in:
Anton Georgiev 2019-08-23 17:22:49 -04:00 committed by GitHub
commit 3917a8206e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,6 +282,7 @@ class WhiteboardToolbar extends Component {
* 4. Trigger initial animation for the icons * 4. Trigger initial animation for the icons
*/ */
// 1st case // 1st case
if (this.thicknessListIconRadius && this.thicknessListIconColor) {
if (colorSelected.value !== prevState.colorSelected.value) { if (colorSelected.value !== prevState.colorSelected.value) {
// 1st case b) // 1st case b)
if (annotationSelected.value !== 'text') { if (annotationSelected.value !== 'text') {
@ -298,6 +299,7 @@ class WhiteboardToolbar extends Component {
this.thicknessListIconRadius.beginElement(); this.thicknessListIconRadius.beginElement();
this.thicknessListIconColor.beginElement(); this.thicknessListIconColor.beginElement();
} }
}
// 4th case, initial animation is triggered in componentDidMount // 4th case, initial animation is triggered in componentDidMount
} }