You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Adaverse (via GitHub)" <gi...@apache.org> on 2023/05/30 16:29:49 UTC
[GitHub] [airflow] Adaverse commented on a diff in pull request #31581: Fix where expanding resizer wouldn't expanse grid view
Adaverse commented on code in PR #31581:
URL: https://github.com/apache/airflow/pull/31581#discussion_r1210534561
##########
airflow/www/static/js/dag/Main.tsx:
##########
@@ -108,15 +110,21 @@ const Main = () => {
const resize = useCallback(
(e: MouseEvent) => {
const gridEl = gridRef.current;
- if (
- gridEl &&
- e.x > minPanelWidth &&
- e.x < window.innerWidth - minPanelWidth
- ) {
- const width = `${e.x}px`;
- gridEl.style.width = width;
- saveWidth(width);
+ if (gridEl) {
+ if (e.x > minPanelWidth && e.x < window.innerWidth - minPanelWidth) {
+ const width = `${e.x}px`;
+ gridEl.style.width = width;
+ saveWidth(width);
+ } else if (
+ e.x < minPanelWidth &&
Review Comment:
So the logic states that if we are beyond `minPanelWidth` then adjust the resizer based on mouse movement and when we are lesser than `minPanelWidth` then given the mouse is moving right, snap to the `minPanelWidth` position.
TL;DR --> Here, we care about what the mouse is doing when not at `minPanelWidth`. But the movement is tracked whether is at `minPanelWidth` or not.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org