From a83b938f8a0246db5017e02a4bab45cb329fad72 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 17 Dec 2020 12:56:41 +0100 Subject: [PATCH] Reposition crop boundary when window resizes. --- public/js/crop_editor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/js/crop_editor.js b/public/js/crop_editor.js index a86a554d..53488f0e 100644 --- a/public/js/crop_editor.js +++ b/public/js/crop_editor.js @@ -218,6 +218,8 @@ class CropEditor { moveTarget.addEventListener('mousedown', this.moveSelectionStart.bind(this)); moveTarget.addEventListener('mousemove', this.moveSelection.bind(this)); moveTarget.addEventListener('mouseup', this.moveSelectionEnd.bind(this)); + + window.addEventListener('resize', this.positionBoundary.bind(this)); } cropSelectionStart(event) {