1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Added comments

This commit is contained in:
Laurent Cozic 2019-02-16 01:15:30 +00:00
parent ce49f5f8b7
commit 9bc7c2fd65

View File

@ -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;