Poser le cadre d'export PDF sur le terrain, le déplacer par une poignée et recadrer la vue dessus

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Antoine Jacquin
2026-09-27 16:53:05 +02:00
parent c1076097f1
commit fe66869cac
3 changed files with 112 additions and 24 deletions

View File

@ -277,7 +277,7 @@ def test_ui_main_layer_and_precision_modes():
# Légende en 16 paliers exacts (échelle log de la densité)
assert "const PREC_LEVELS = 16;" in _MAP_JS and "repeat(16, 1fr)" in _MAP_CSS
# Pile et fusions supprimées
for gone in ("function moveLayer(", "reorderRelative", "stackBlend", "dragstart", "blendOptions"):
for gone in ("function moveLayer(", "reorderRelative", "stackBlend", "addEventListener('dragstart'", "blendOptions"):
assert gone not in _MAP_JS, gone
assert "Haut de pile" not in _MAP_HTML
# Lien partagé : principale, mode:opacité, fond
@ -1332,7 +1332,12 @@ def test_map_ui_has_pdf_export():
assert f'value="{scale}"' in _MAP_HTML
assert "api/export/frame?" in _MAP_JS and "api/export/pdf?" in _MAP_JS
assert "createPane('printFrame')" in _MAP_JS
assert "map.on('moveend', printRefreshFrame)" in _MAP_JS
# cadre posé sur le terrain : il ne suit plus la vue, on le fait glisser
assert "map.on('moveend', printRefreshFrame)" not in _MAP_JS
assert "draggable: true" in _MAP_JS and "on('dragend', printDragEnd)" in _MAP_JS
assert "PRINT.center" in _MAP_JS
for id_ in ("printHere", "printFit"):
assert f'id="{id_}"' in _MAP_HTML, id_
assert "#printcard" in _MAP_CSS
# bouton toujours visible : indépendant de /api/status.available
assert 'id="btnPrint"' in _MAP_HTML and 'id="btnPrint" hidden' not in _MAP_HTML