v1.50.3: sizes are not coordinates (HP-1502-01)

The ±4 bound from v1.50.2 measured view_box[2:4] and room w/h with the same
ruler as coordinates, so zero and negative sizes still passed the schema —
and viewBox='0 0 0 0' draws nothing on every client, with the static card
computing aspect-ratio: 0 / 0 on top. _EXTENT now requires strictly positive
sizes with a floor of one thousandth of the canvas (1 render unit — far
below any real room, keeps the maths finite); coordinates stay allowed to be
negative, a crop origin legitimately sits past the edge.

Defensive layer for stores that already hold a broken viewport: spaceModels
falls back to the whole canvas — both cards render from that model, so both
get the fallback — and a legacy rectangle with a negative size reads as the
same rectangle drawn from the other corner.

Also: the room settings button is the bottom row of the room card, and the
room name renders in the same spot in view and plan modes (owner's request,
committed earlier on dev).
This commit is contained in:
Matysh
2026-07-29 08:16:12 +03:00
parent 8db6b2673f
commit df65d25348
16 changed files with 200 additions and 55 deletions
+21
View File
@@ -6,6 +6,27 @@
> **Правило проекта:** оба файла пополняются в одном коммите с самим
> изменением — как и остальная документация (см. docs/STATUS.md).
## v1.50.3 — 2026-07-29
**По ревью v1.50.2**
- **Размер — не координата (HP-1502-01).** Граница ±4 из v1.50.2 мерила все
четыре элемента view_box и w/h комнат одинаково, поэтому `[0, 0, 0, 0]` и
отрицательные размеры всё ещё проходили — а нулевая ось сериализуется в
`viewBox="0 0 0 0"`: пустой план у всех клиентов, и `aspect-ratio: 0 / 0` у
статичной карточки сверху. У размеров теперь свой validator: строго
положительные, пол — одна тысячная холста; координаты по-прежнему могут
быть отрицательными — начало кропа законно выходит за край. А поскольку в
сторе битый viewport может уже лежать, обе карточки падают на полный холст
вместо пустого экрана, и legacy-прямоугольник с отрицательным размером
читается как тот же прямоугольник, нарисованный из другого угла.
**Также в этом релизе**
- Кнопка настроек комнаты переехала в самый низ карточки комнаты, а имя
комнаты отображается ровно в одном и том же месте в просмотре и в
редакторе плана — кнопка и метрики больше не участвуют в центрировании.
## v1.50.2 — 2026-07-29
**По ревью v1.50.1**