Go to file
jordi fita mas a9745ec117 Improve “snap to grid” feel of reservation drag
There was an issue when dragging the reservation too close to the left:
DropArea was no longer receiving onPositionChanged events because the
hotspot was already outside its area.  By default the hotspot is (0, 0),
and was outside the area as soon as the reservation was dragged to day
“-1” of the period.

Changing hotspot to (-width, 0) would only move the problem from the
left to the right side, whe dragging to the day past the last of the
period.

I tried to have the DropArea to have a left margin of -30 days, that way
it would fall way outside the range and continue receiving drag events.
However, ListView’s `clip: true` is not only to limit the visual area—it
also clips the region to receive events—, and i was at square one.

I had to merge all DropArea into a single element, something i should
have to do regardless, and move it as a sibling of the ListView, anchor
to it, and add the negative left margin.  Then, i have to transform
drag’s coordinates from DropArea to ListView.contentItem to know the
correct position of the reservation rectangle relative to its parent.
Using contentItem also obviates the need of having to use scroll
offsets, as this is a Flickable concernt, not of contentItem.

Finally, i changed the Y position of the hotspot to half the rectangle
to give the same distance from the top and from the bottom before
snapping to the previour or next row.
2025-01-24 15:30:03 +01:00
cmd/camper Increase HTTP timeout 2024-03-05 12:05:00 +01:00
debian Include weasyprint as dependency of camper package 2024-04-28 21:47:44 +02:00
demo Add season dates for “next year” 2024-11-20 19:43:59 +01:00
deploy Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
pkg Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
po Fix French typo 2024-07-15 23:12:12 +02:00
revert Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
src Improve “snap to grid” feel of reservation drag 2025-01-24 15:30:03 +01:00
test Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
verify Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
web Change “ACSI” to “ACSI / ANWB” 2024-05-13 10:40:21 +02:00
.gitignore Add skeleton for a QML application 2024-12-14 01:19:20 +01:00
CMakeLists.txt Add a very ugly login page to test database connection 2024-12-16 12:59:19 +01:00
Makefile Send an email on notification of success payment 2024-02-13 05:20:35 +01:00
go.mod Add customer and invoices sections 2024-04-28 20:28:45 +02:00
go.sum Add customer and invoices sections 2024-04-28 20:28:45 +02:00
guix.scm Remove postgresql-iban from guix.scm 2024-12-24 04:04:39 +01:00
sqitch.conf Add empty Sqitch configuration anq plan files 2023-07-20 23:43:23 +02:00
sqitch.plan Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00