diff options
author | Victor B <39555268+victorbnl@users.noreply.github.com> | 2023-05-27 03:45:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-27 07:15:11 +0530 |
commit | 6563a0b77f0380db938bb3c53703fa3a0ddd8b1d (patch) | |
tree | 18f32975715ca5c3bd6f691905c43b75a6da992d /src/features/todos | |
parent | Upgrade npm modules (diff) | |
download | ferdium-app-6563a0b77f0380db938bb3c53703fa3a0ddd8b1d.tar.gz ferdium-app-6563a0b77f0380db938bb3c53703fa3a0ddd8b1d.tar.zst ferdium-app-6563a0b77f0380db938bb3c53703fa3a0ddd8b1d.zip |
Fix to allow resizing of the todos panel (#1120)
* Change all functions in the 'TodosPanel.tsx' to consistently use arrow-style
---------
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/features/todos')
-rw-r--r-- | src/features/todos/components/TodosWebview.tsx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/features/todos/components/TodosWebview.tsx b/src/features/todos/components/TodosWebview.tsx index 3385ff74c..4b53df956 100644 --- a/src/features/todos/components/TodosWebview.tsx +++ b/src/features/todos/components/TodosWebview.tsx | |||
@@ -98,15 +98,15 @@ class TodosWebview extends Component<IProps, IState> { | |||
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | startResize(e: MouseEvent<HTMLDivElement>): void { | 101 | startResize = (e: MouseEvent<HTMLDivElement>): void => { |
102 | this.setState({ | 102 | this.setState({ |
103 | isDragging: true, | 103 | isDragging: true, |
104 | initialPos: e.clientX, | 104 | initialPos: e.clientX, |
105 | delta: 0, | 105 | delta: 0, |
106 | }); | 106 | }); |
107 | } | 107 | }; |
108 | 108 | ||
109 | resizePanel(e: MouseEventInit): void { | 109 | resizePanel = (e: MouseEventInit): void => { |
110 | const { minWidth } = this.props; | 110 | const { minWidth } = this.props; |
111 | const { isDragging, initialPos } = this.state; | 111 | const { isDragging, initialPos } = this.state; |
112 | 112 | ||
@@ -117,9 +117,9 @@ class TodosWebview extends Component<IProps, IState> { | |||
117 | delta, | 117 | delta, |
118 | }); | 118 | }); |
119 | } | 119 | } |
120 | } | 120 | }; |
121 | 121 | ||
122 | stopResize(): void { | 122 | stopResize = (): void => { |
123 | const { resize, minWidth } = this.props; | 123 | const { resize, minWidth } = this.props; |
124 | const { isDragging, delta, width } = this.state; | 124 | const { isDragging, delta, width } = this.state; |
125 | 125 | ||
@@ -138,9 +138,9 @@ class TodosWebview extends Component<IProps, IState> { | |||
138 | 138 | ||
139 | resize(newWidth); | 139 | resize(newWidth); |
140 | } | 140 | } |
141 | } | 141 | }; |
142 | 142 | ||
143 | startListeningToIpcMessages() { | 143 | startListeningToIpcMessages = (): void => { |
144 | if (!this.webview) { | 144 | if (!this.webview) { |
145 | return; | 145 | return; |
146 | } | 146 | } |
@@ -149,7 +149,7 @@ class TodosWebview extends Component<IProps, IState> { | |||
149 | this.webview.addEventListener('ipc-message', e => { | 149 | this.webview.addEventListener('ipc-message', e => { |
150 | handleClientMessage(e.channel, e.args[0]); | 150 | handleClientMessage(e.channel, e.args[0]); |
151 | }); | 151 | }); |
152 | } | 152 | }; |
153 | 153 | ||
154 | render(): ReactElement { | 154 | render(): ReactElement { |
155 | const { | 155 | const { |