mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-16 20:02:20 +02:00
Photoshop-parity editor client: layers, selection/masking, brushes,
smart filters, LUT import, Quick Edit, mobile gestures, workspaces,
batch operations, and the service-worker versioning (v978->v1006).
Source: vendor/photocraft (ad1cff44) photo-editor client files, merged
onto upstream/dev (a8c147b2). Conflict resolution documented in
pr_work/A_conflicts.md; editor files taken from vendor/photocraft
(upstream's editor is an earlier snapshot of the same feature).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
784 B
Python
16 lines
784 B
Python
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
TOOLBAR = (ROOT / "static/js/editor/build/toolbar.js").read_text()
|
|
|
|
|
|
def test_tool_flyout_is_positioned_relative_to_its_containing_block():
|
|
# The flyout is position:fixed, but the gallery modal has a transform that
|
|
# makes it the containing block, so the inline left/top must subtract that
|
|
# block's origin or the popup opens far from its button.
|
|
assert "const cb = flyout.offsetParent;" in TOOLBAR
|
|
assert "const cbX = cbRect.left + (cb ? cb.clientLeft : 0);" in TOOLBAR
|
|
assert "const cbY = cbRect.top + (cb ? cb.clientTop : 0);" in TOOLBAR
|
|
assert "flyout.style.left = (r.right + 4 - cbX) + 'px';" in TOOLBAR
|
|
assert "flyout.style.top = (Math.max(r.top, 4) - cbY) + 'px';" in TOOLBAR
|