Гант: прокрутка колесом, Ctrl - горизонтально, Ctrl+Shift - масштаб, границы полотна; тест; docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { renderPage } from "./html.js";
|
||||
import { renderAris } from "./aris.js";
|
||||
import { clampPx, placeLabels, renderGantt, stageOrder, summarizeGroup } from "./gantt.js";
|
||||
import { buildApi } from "./http-api.js";
|
||||
@@ -195,6 +196,15 @@ describe("Гант: группы, вехи, свёртывание, масшта
|
||||
expect(svg).not.toContain("url(#hatch)");
|
||||
});
|
||||
|
||||
it("страница: колесо - вертикальная прокрутка, Ctrl+колесо - горизонтальная, Ctrl+Shift+колесо - масштаб, границы полотна", () => {
|
||||
const html = renderPage({ set: "khbuild", stages: [], warnings: [], rows: 0, questions: 0 });
|
||||
expect(html).toContain("e.ctrlKey && e.shiftKey");
|
||||
expect(html).toContain("ty -= e.deltaY"); // колесо - вертикально
|
||||
expect(html).toContain("tx -= dd * lin"); // Ctrl+колесо - горизонтально
|
||||
expect(html).toContain("function clamp()"); // границы полотна
|
||||
expect(html).toContain("window.addEventListener('resize', place)");
|
||||
});
|
||||
|
||||
it("масштаб времени меняет только ось: ширина растёт, шрифты и высота остаются", () => {
|
||||
const a = renderGantt(ms, sch, { px: 5 });
|
||||
const b = renderGantt(ms, sch, { px: 20 });
|
||||
|
||||
Reference in New Issue
Block a user