mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(diffs): increase resolution scaling factor
This commit is contained in:
@@ -60,6 +60,7 @@ export class PlaywrightDiffScreenshotter implements DiffScreenshotter {
|
||||
try {
|
||||
page = await lease.browser.newPage({
|
||||
viewport: { width: 1200, height: 900 },
|
||||
deviceScaleFactor: 2,
|
||||
colorScheme: params.theme,
|
||||
});
|
||||
await page.route(`http://127.0.0.1${VIEWER_ASSET_PREFIX}*`, async (route) => {
|
||||
@@ -124,6 +125,7 @@ export class PlaywrightDiffScreenshotter implements DiffScreenshotter {
|
||||
await page.screenshot({
|
||||
path: params.outputPath,
|
||||
type: "png",
|
||||
scale: "device",
|
||||
clip: {
|
||||
x: Math.max(box.x - padding, 0),
|
||||
y: Math.max(box.y - padding, 0),
|
||||
|
||||
Reference in New Issue
Block a user