Set selection when unlocking (#567)
A common workflow I have is to enable the lock, draw a bunch of things, unlock to be able to select stuff. However, after I unlock, the last shape is still enabled, so I end up drawing yet another of the same shape :( This PR resets to selection instead!
This commit is contained in:
parent
ed42672fd3
commit
2a87c7381b
@ -496,7 +496,12 @@ export class App extends React.Component<any, AppState> {
|
||||
return (
|
||||
<LockIcon
|
||||
checked={elementLocked}
|
||||
onChange={() => this.setState({ elementLocked: !elementLocked })}
|
||||
onChange={() => {
|
||||
this.setState({
|
||||
elementLocked: !elementLocked,
|
||||
elementType: elementLocked ? "selection" : this.state.elementType,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user