fix: Improve rendering stability

This commit is contained in:
Mark Tolmacs
2025-09-05 12:58:22 +02:00
parent 5ba2798306
commit 2ed78d4895
5 changed files with 5 additions and 2 deletions

View File

@@ -46,6 +46,7 @@
"build:version": "node ../scripts/build-version.js", "build:version": "node ../scripts/build-version.js",
"build": "yarn build:app && yarn build:version", "build": "yarn build:app && yarn build:version",
"start": "yarn && vite", "start": "yarn && vite",
"start:test": "yarn && vite --mode test",
"start:production": "yarn build && yarn serve", "start:production": "yarn build && yarn serve",
"serve": "npx http-server build -a localhost -p 5001 -o", "serve": "npx http-server build -a localhost -p 5001 -o",
"build:preview": "yarn build && vite preview --port 5000" "build:preview": "yarn build && vite preview --port 5000"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

@@ -64,6 +64,7 @@
"build:preview": "yarn --cwd ./excalidraw-app build:preview", "build:preview": "yarn --cwd ./excalidraw-app build:preview",
"start": "yarn --cwd ./excalidraw-app start", "start": "yarn --cwd ./excalidraw-app start",
"start:production": "yarn --cwd ./excalidraw-app start:production", "start:production": "yarn --cwd ./excalidraw-app start:production",
"start:test": "yarn --cwd ./excalidraw-app start:test",
"start:example": "yarn build:packages && yarn --cwd ./examples/with-script-in-browser start", "start:example": "yarn build:packages && yarn --cwd ./examples/with-script-in-browser start",
"test:all": "yarn test:typecheck && yarn test:code && yarn test:other && yarn test:app --watch=false", "test:all": "yarn test:typecheck && yarn test:code && yarn test:other && yarn test:app --watch=false",
"test:app": "vitest", "test:app": "vitest",

View File

@@ -21,6 +21,7 @@ import {
assertNever, assertNever,
COLOR_PALETTE, COLOR_PALETTE,
LINE_POLYGON_POINT_MERGE_DISTANCE, LINE_POLYGON_POINT_MERGE_DISTANCE,
isTestEnv,
} from "@excalidraw/common"; } from "@excalidraw/common";
import { RoughGenerator } from "roughjs/bin/generator"; import { RoughGenerator } from "roughjs/bin/generator";
@@ -182,7 +183,7 @@ export const generateRoughOptions = (
continuousPath = false, continuousPath = false,
): Options => { ): Options => {
const options: Options = { const options: Options = {
seed: element.seed, seed: isTestEnv() ? 1 : element.seed,
strokeLineDash: strokeLineDash:
element.strokeStyle === "dashed" element.strokeStyle === "dashed"
? getDashArrayDashed(element.strokeWidth) ? getDashArrayDashed(element.strokeWidth)

View File

@@ -44,7 +44,7 @@ export default defineConfig({
use: { use: {
...devices["Desktop Chrome"], ...devices["Desktop Chrome"],
launchOptions: { launchOptions: {
args: ["--disable-font-subpixel-positioning"], args: ["--disable-font-subpixel-positioning", "--disable-gpu"],
}, },
}, },
}, },