diff options
| author | bobzel <zzzman@gmail.com> | 2024-04-23 18:35:59 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-04-23 18:35:59 -0400 |
| commit | 9d69ab27de83ead3e499edc9028ba85749407a1e (patch) | |
| tree | fb7337fc899549665d6c7634435bc7ce518a58f9 /src/client/views/AntimodeMenu.tsx | |
| parent | 9e809f8748d1812bb03ec6471aa6f97467f8f75a (diff) | |
more lint cleanup
Diffstat (limited to 'src/client/views/AntimodeMenu.tsx')
| -rw-r--r-- | src/client/views/AntimodeMenu.tsx | 18 |
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'; |
