fixes SelectionBoxWidget returning undefined

This commit is contained in:
Renato Böhler
2021-06-23 11:32:40 -03:00
parent 44fae73a52
commit 1bdc6c7624
2 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ export abstract class AbstractDisplacementState<E extends CanvasEngine = CanvasE
this.registerAction(
new Action({
type: InputType.MOUSE_UP,
fire: () => this.handleMoveEnd(),
fire: () => this.handleMoveEnd()
})
);
@ -75,7 +75,7 @@ export abstract class AbstractDisplacementState<E extends CanvasEngine = CanvasE
this.registerAction(
new Action({
type: InputType.TOUCH_END,
fire: () => this.handleMoveEnd(),
fire: () => this.handleMoveEnd()
})
);
}
@ -94,7 +94,7 @@ export abstract class AbstractDisplacementState<E extends CanvasEngine = CanvasE
displacementY: y - this.initialY,
virtualDisplacementX: (x - this.initialX) / (this.engine.getModel().getZoomLevel() / 100.0),
virtualDisplacementY: (y - this.initialY) / (this.engine.getModel().getZoomLevel() / 100.0),
event,
event
});
}

View File

@ -17,7 +17,7 @@ export class SelectionBoxWidget extends React.Component<SelectionBoxWidgetProps>
render() {
const { rect } = this.props;
if (!rect) return;
if (!rect) return null;
return (
<S.Container