feat(annotations): resize and move annotations in document view #235

Merged
marcel merged 25 commits from feat/issue-233-annotation-resize-move into main 2026-04-14 14:55:28 +02:00
Showing only changes of commit f76a6c0ee5 - Show all commits

View File

@@ -0,0 +1,12 @@
-- Enforce valid normalized coordinate ranges for annotation bounding boxes.
-- x and y must be within [0, 1]; width and height must be at least 1% of the
-- document dimension and at most 100%.
-- Consistent with the application-layer minimum draw threshold (0.01).
ALTER TABLE document_annotations
ADD CONSTRAINT chk_annotation_bounds
CHECK (
x >= 0 AND x <= 1 AND
y >= 0 AND y <= 1 AND
width >= 0.01 AND width <= 1 AND
height >= 0.01 AND height <= 1
);