From 9bc7c2fd652666defa4a261446f67af086ccf60d Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sat, 16 Feb 2019 01:15:30 +0000 Subject: [PATCH] Added comments --- ElectronClient/app/gui/VerticalResizer.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ElectronClient/app/gui/VerticalResizer.jsx b/ElectronClient/app/gui/VerticalResizer.jsx index 15c07c6e5..a815e753b 100644 --- a/ElectronClient/app/gui/VerticalResizer.jsx +++ b/ElectronClient/app/gui/VerticalResizer.jsx @@ -22,6 +22,8 @@ class VerticalResizer extends React.PureComponent { } document_onDragOver(event) { + // This is just to prevent the cursor from changing to a "+" as it's dragged + // over other elements. With this it stays a normal cursor. event.dataTransfer.dropEffect = 'none'; } @@ -41,6 +43,9 @@ class VerticalResizer extends React.PureComponent { } onDrag(event) { + // If we got a drag event with no buttons pressed, it's the last drag event + // that we should ignore, because it's sometimes use to put the dragged element + // back to its original position (if there was no valid drop target), which we don't want. if (!event.nativeEvent.buttons) return; const newX = event.nativeEvent.screenX;