|
|
@@ -502,6 +502,26 @@ const band = await page.evaluate(() => {
|
|
|
});
|
|
|
ok("topo: window fits the drawing (no letterbox bands)", band < 8, String(band));
|
|
|
|
|
|
+// fan glyph: the rotation must be hub-centered (fill-box origin wobbled it)
|
|
|
+{
|
|
|
+ const fanHub = await page.evaluate(() => {
|
|
|
+ const h = document.querySelector("#topo .fan .hub");
|
|
|
+ if (!h) return null;
|
|
|
+ const r = h.getBoundingClientRect();
|
|
|
+ return [r.x + r.width / 2, r.y + r.height / 2];
|
|
|
+ });
|
|
|
+ if (fanHub) {
|
|
|
+ await page.waitForTimeout(260);
|
|
|
+ const fanHub2 = await page.evaluate(() => {
|
|
|
+ const h = document.querySelector("#topo .fan .hub");
|
|
|
+ const r = h.getBoundingClientRect();
|
|
|
+ return [r.x + r.width / 2, r.y + r.height / 2];
|
|
|
+ });
|
|
|
+ const drift = Math.hypot(fanHub[0] - fanHub2[0], fanHub[1] - fanHub2[1]);
|
|
|
+ ok("topo: fan spin is hub-centered (no wobble)", drift < 2, `${drift.toFixed(2)}px drift`);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// the default layout ends flush at the dock: px geometry is clamped to the
|
|
|
// layer, which shrinks when the dock (a sibling) becomes visible
|
|
|
const flush = await page.evaluate(() => {
|