diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-15 16:28:57 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-15 17:24:42 -0300 |
| commit | 1ab4c071be58033d5452f69797ca8e2c32240cff (patch) | |
| tree | afa108a1c372276da1d2c62b6c05d8f167cc81b8 /test/web-snapshots/touch.mjs | |
| parent | c6ab9db0fdbcb8d16f666749194bb111218b96a8 (diff) | |
| download | pardes-1ab4c071be58033d5452f69797ca8e2c32240cff.tar.gz pardes-1ab4c071be58033d5452f69797ca8e2c32240cff.zip | |
Separate tag text geometry from physical pane grips
Diffstat (limited to 'test/web-snapshots/touch.mjs')
| -rw-r--r-- | test/web-snapshots/touch.mjs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/web-snapshots/touch.mjs b/test/web-snapshots/touch.mjs index ecd8a9a3..e65fdb80 100644 --- a/test/web-snapshots/touch.mjs +++ b/test/web-snapshots/touch.mjs @@ -79,6 +79,22 @@ export default async function ({ grid, touch, wait, stable, delay, evaluate, mou renderer.render(); result.closedGapBorders=borders(); result.borderChangeInvalidates=renderer.layerRoot.firstChild!==withGap; + const tagValues=[2,2,0,42,1,0,1,1,1,1,0x334455]; + wasm.pardes_tag_layer_limit=()=>1; + wasm.pardes_tag_layer_value=(_,field)=>tagValues[field]; + wasm.pardes_tag_layer_cells=()=>1024; + wasm.pardes_tagline_band_offset=()=>2560; + renderer.render(); + const tag=renderer.tagRoot.firstChild; + result.tag={left:parseFloat(tag.style.left),top:parseFloat(tag.style.top),width:parseFloat(tag.style.width), + text:tag.textContent,cursor:tag.querySelector('.is-cursor')?.textContent, + gripVisible:renderer.cells[0].style.visibility,covered:renderer.cells[1].style.visibility, + background:tag.style.backgroundColor}; + renderer.render(); + result.tag.cached=renderer.tagRoot.firstChild===tag; + tagValues[10]=0x556677; + renderer.render(); + result.tag.bgInvalidates=renderer.tagRoot.firstChild!==tag; root.remove();return result; })()`); assert.deepEqual(compactGeometry.bands, [[0,10],[10,20],[30,20]], "compact headers release real height to additional body rows"); @@ -90,6 +106,10 @@ export default async function ({ grid, touch, wait, stable, delay, evaluate, mou assert.deepEqual(compactGeometry.closedGapBorders,[30]); assert(compactGeometry.borderChangeInvalidates,"separator changes invalidate an otherwise unchanged layer"); + assert.deepEqual(compactGeometry.tag, {left:10,top:10,width:10,text:"AB",cursor:"B", + gripVisible:"",covered:"hidden",background:"rgb(51, 68, 85)",cached:true,bgInvalidates:true}, + "tag text uses its own columns after a fixed body-width grip, with cursor and cached base background"); + let frame = await grid(); assert.equal(tags(frame).length, 1); styled(frame); |
