feat: stop using CSS filters for dark mode (static canvas) (#10578)

* feat: stop using CSS filters for dark mode (static canvas)

* fix comment

* remove conditional dark mode export

* make shape cache theme-aware

* refactor

* refactor

* fixes and notes
This commit is contained in:
David Luzar
2026-01-04 15:16:35 +01:00
committed by GitHub
parent b5fc873323
commit 63e1148280
30 changed files with 1070 additions and 389 deletions
+2 -1
View File
@@ -897,6 +897,7 @@ export const getArrowheadPoints = (
return [x2, y2, x3, y3, x4, y4];
};
// TODO reuse shape.ts
const generateLinearElementShape = (
element: ExcalidrawLinearElement,
): Drawable => {
@@ -954,7 +955,7 @@ const getLinearElementRotatedBounds = (
}
// first element is always the curve
const cachedShape = ShapeCache.get(element)?.[0];
const cachedShape = ShapeCache.get(element, null)?.[0];
const shape = cachedShape ?? generateLinearElementShape(element);
const ops = getCurvePathOps(shape);
const transformXY = ([x, y]: GlobalPoint) =>