|
|
|
@ -205,6 +205,18 @@ export default class AlwaysOnTop extends Component<*, State> { |
|
|
|
|
this._hideToolbarAfterTimeout(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Sets a timeout to hide the toolbar when the toolbar is shown. |
|
|
|
|
* |
|
|
|
|
* @inheritdoc |
|
|
|
|
* @returns {void} |
|
|
|
|
*/ |
|
|
|
|
componentDidUpdate(prevProps: *, prevState: State) { |
|
|
|
|
if (!prevState.visible && this.state.visible) { |
|
|
|
|
this._hideToolbarAfterTimeout(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Removes all listeners. |
|
|
|
|
* |
|
|
|
@ -223,18 +235,6 @@ export default class AlwaysOnTop extends Component<*, State> { |
|
|
|
|
window.removeEventListener('mousemove', this._mouseMove); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Sets a timeout to hide the toolbar when the toolbar is shown. |
|
|
|
|
* |
|
|
|
|
* @inheritdoc |
|
|
|
|
* @returns {void} |
|
|
|
|
*/ |
|
|
|
|
componentWillUpdate(nextProps: *, nextState: State) { |
|
|
|
|
if (!this.state.visible && nextState.visible) { |
|
|
|
|
this._hideToolbarAfterTimeout(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Implements React's {@link Component#render()}. |
|
|
|
|
* |
|
|
|
|