|
|
@@ -59,9 +59,15 @@ export class RountangleComponent extends React.Component<RountangleProps, Rounta
|
|
|
event.stopPropagation();
|
|
|
event.preventDefault();
|
|
|
|
|
|
- // only left mouse button
|
|
|
- if (event.button !== 0) return;
|
|
|
- this.setState({dragging: false, moved: false});
|
|
|
+ // if left button, complete dragging
|
|
|
+ if (event.button === 0) {
|
|
|
+ this.setState({dragging: false, moved: false});
|
|
|
+
|
|
|
+ // + alt key deletes block
|
|
|
+ if (event.altKey) {
|
|
|
+ this.props.dispatch({tag: 'deleteRountangle', id: this.props.id});
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
render() {
|