Merge branch 'master' into move-error-boundry

This commit is contained in:
Peter Holmberg
2019-02-13 16:52:52 +01:00
217 changed files with 3147 additions and 2729 deletions

View File

@@ -31,18 +31,18 @@ interface State {
}
export class PanelHeader extends Component<Props, State> {
clickCoordinates: ClickCoordinates = {x: 0, y: 0};
clickCoordinates: ClickCoordinates = { x: 0, y: 0 };
state = {
panelMenuOpen: false,
clickCoordinates: {x: 0, y: 0}
clickCoordinates: { x: 0, y: 0 },
};
eventToClickCoordinates = (event: React.MouseEvent<HTMLDivElement>) => {
return {
x: event.clientX,
y: event.clientY
y: event.clientY,
};
}
};
onMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {
this.clickCoordinates = this.eventToClickCoordinates(event);
@@ -50,7 +50,7 @@ export class PanelHeader extends Component<Props, State> {
isClick = (clickCoordinates: ClickCoordinates) => {
return isEqual(clickCoordinates, this.clickCoordinates);
}
};
onMenuToggle = (event: React.MouseEvent<HTMLDivElement>) => {
if (this.isClick(this.eventToClickCoordinates(event))) {