mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' into move-error-boundry
This commit is contained in:
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user