aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/AntimodeMenu.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/AntimodeMenu.tsx')
-rw-r--r--src/client/views/AntimodeMenu.tsx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/views/AntimodeMenu.tsx b/src/client/views/AntimodeMenu.tsx
index db7e64deb..b1eb730fa 100644
--- a/src/client/views/AntimodeMenu.tsx
+++ b/src/client/views/AntimodeMenu.tsx
@@ -3,6 +3,7 @@ import * as React from 'react';
import { SettingsManager } from '../util/SettingsManager';
import './AntimodeMenu.scss';
import { ObservableReactComponent } from './ObservableReactComponent';
+
export interface AntimodeMenuProps {}
/**
@@ -76,7 +77,7 @@ export abstract class AntimodeMenu<T extends AntimodeMenuProps> extends Observab
};
@action
- protected pointerLeave = (e: React.PointerEvent) => {
+ protected pointerLeave = () => {
if (!this.Pinned && this._canFade) {
this._transitionProperty = 'opacity';
this._transitionDuration = '0.5s';
@@ -87,7 +88,7 @@ export abstract class AntimodeMenu<T extends AntimodeMenuProps> extends Observab
};
@action
- protected pointerEntered = (e: React.PointerEvent) => {
+ protected pointerEntered = () => {
this._transitionProperty = 'opacity';
this._transitionDuration = '0.1s';
this._transitionDelay = '';
@@ -95,8 +96,10 @@ export abstract class AntimodeMenu<T extends AntimodeMenuProps> extends Observab
};
@action
- protected togglePin = (e: React.MouseEvent) => {
- runInAction(() => (this.Pinned = !this.Pinned));
+ protected togglePin = () => {
+ runInAction(() => {
+ this.Pinned = !this.Pinned;
+ });
};
protected dragStart = (e: React.PointerEvent) => {
@@ -114,8 +117,7 @@ export abstract class AntimodeMenu<T extends AntimodeMenuProps> extends Observab
@action
protected dragging = (e: PointerEvent) => {
- const width = this._mainCont.current!.getBoundingClientRect().width;
- const height = this._mainCont.current!.getBoundingClientRect().height;
+ const { width, height } = this._mainCont.current!.getBoundingClientRect();
const left = e.pageX - this._offsetX;
const top = e.pageY - this._offsetY;
@@ -139,9 +141,7 @@ export abstract class AntimodeMenu<T extends AntimodeMenuProps> extends Observab
e.preventDefault();
};
- protected getDragger = () => {
- return <div className="antimodeMenu-dragger" key="dragger" onPointerDown={this.dragStart} style={{ width: '20px' }} />;
- };
+ protected getDragger = () => <div className="antimodeMenu-dragger" key="dragger" onPointerDown={this.dragStart} style={{ width: '20px' }} />;
protected getElement(buttons: JSX.Element, expanded: boolean = false) {
const containerClass = expanded ? 'antimodeMenu-cont expanded' : 'antimodeMenu-cont';