mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-05-15 23:50:58 -04:00
Add component will unmount to deactivate to all tools (#657)
This commit is contained in:
parent
2b462eb676
commit
45018e4f64
19 changed files with 89 additions and 8 deletions
src/containers
|
@ -44,6 +44,11 @@ class BitLineMode extends React.Component {
|
|||
shouldComponentUpdate (nextProps) {
|
||||
return nextProps.isBitLineModeActive !== this.props.isBitLineModeActive;
|
||||
}
|
||||
componentWillUnmount () {
|
||||
if (this.tool) {
|
||||
this.deactivateTool();
|
||||
}
|
||||
}
|
||||
activateTool () {
|
||||
clearSelection(this.props.clearSelectedItems);
|
||||
this.props.clearGradient();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue