Change the default tool in multi-user

This commit is contained in:
Vitor Mateus 2019-08-06 10:16:33 -03:00
parent 804a773466
commit a6ce565826

View File

@ -71,13 +71,20 @@ class WhiteboardToolbar extends Component {
constructor(props) {
super(props);
const { annotations } = this.props;
const { annotations, multiUser } = this.props;
let annotationSelected = {
icon: 'hand',
value: 'hand',
};
if (multiUser) {
annotationSelected = {
icon: 'pen_tool',
value: 'pencil',
};
}
if (!annotations.some(el => el.value === annotationSelected.value) && annotations.length > 0) {
annotationSelected = annotations[annotations.length - 1];
}