perf(canvas): 画布媒体 - 优化媒体加载、播放器与节点交互 (#357)
Merge origin/main at 2b7375f and retain canvas media performance, player layout, and interaction updates.
Co-authored-by: ddCat <2695092045@qq.com>
This commit is contained in:
1 parent
16e9de9fd9
commit
c891497df9
58 files changed
+2662
-207
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
import { describe, expect, test } from "bun:test";
|
||||
|
||||
const stylesSource = readFileSync(resolve(import.meta.dir, "../src/styles/globals.css"), "utf8");
|
||||
|
||||
describe("canvas cross-browser positioning", () => {
|
||||
test("uses standard transforms for the committed raster layer", () => {
|
||||
const rasterLayer = stylesSource.match(/\.canvas-world-raster-layer\s*\{[\s\S]*?\}/)?.[0] || "";
|
||||
expect(rasterLayer).toContain("transform: scale(var(--canvas-committed-scale))");
|
||||
expect(rasterLayer).toContain("transform-origin: 0 0");
|
||||
expect(rasterLayer).not.toContain("zoom:");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user