From 1061323d8bab4650d03d799aeb1272ebe0c51594 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 11 Aug 2023 15:47:42 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- grid-n-view.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/grid-n-view.js b/grid-n-view.js index fa6405c..7e218e1 100644 --- a/grid-n-view.js +++ b/grid-n-view.js @@ -773,6 +773,8 @@ var Gallery = { dragged = evt.target dragged.classList.add('dragging') } }) var skip_dragover = false + // XXX do we .__update_grid_size() live (current) or after the + // drag is over??? this.dom .addEventListener('dragenter', function(evt){ // NOTE: this prevents jumping back and forth if moving @@ -800,13 +802,15 @@ var Gallery = { }) } }) // check if we just went out of the edge image... // NOTE: this handles a special case: - // when a narrow image is at the edge and the adjacent image - // is wide. dragging the narrow image over the wide places - // it at the other side ow the wide image but the cursor is - // now over the wide image so to drag back we either need - // to exit it and drag over again (not intuitive) or simply - // drag over the oppoiste edge of the wide image (dragleave - // handler) + // |[A][ B ][C] | + // when a narrow image (A, C) is at the edge and the + // adjacent image is wide (b). + // dragging the narrow image over the wide places it at + // the other side of the wide image but the cursor is now + // over the wide image so to drag back we either need to + // drag out of it and drag over again (not intuitive) or + // simply drag over the oppoiste edge of the wide image + // (dragleave handler) // NOTE: we are not implementing the whole drag process here // because dragging up/down here is far more complicated // than when doing it in dragover...