@@ -322,7 +322,7 @@ const generateElementCanvas = (
322322 return {
323323 element,
324324 canvas,
325- theme : appState . theme ,
325+ theme : renderConfig . theme ,
326326 scale,
327327 zoomValue : zoom . value ,
328328 canvasOffsetX,
@@ -553,7 +553,6 @@ export let elementWithCanvasCache = new WeakMap<
553553
554554export const clearRenderCache = ( ) => {
555555 elementWithCanvasCache = new WeakMap ( ) ;
556- pathsCache = new WeakMap ( ) ;
557556} ;
558557
559558const generateElementWithCanvas = (
@@ -582,7 +581,7 @@ const generateElementWithCanvas = (
582581 if (
583582 ! prevElementWithCanvas ||
584583 shouldRegenerateBecauseZoom ||
585- prevElementWithCanvas . theme !== appState . theme ||
584+ prevElementWithCanvas . theme !== renderConfig . theme ||
586585 prevElementWithCanvas . boundTextElementVersion !== boundTextElementVersion ||
587586 prevElementWithCanvas . imageCrop !== imageCrop ||
588587 prevElementWithCanvas . containingFrameOpacity !== containingFrameOpacity ||
@@ -763,14 +762,14 @@ export const renderElement = (
763762
764763 context . lineWidth = FRAME_STYLE . strokeWidth / appState . zoom . value ;
765764 context . strokeStyle =
766- appState . theme === THEME . DARK
765+ renderConfig . theme === THEME . DARK
767766 ? applyDarkModeFilter ( FRAME_STYLE . strokeColor )
768767 : FRAME_STYLE . strokeColor ;
769768
770769 // TODO change later to only affect AI frames
771770 if ( isMagicFrameElement ( element ) ) {
772771 context . strokeStyle =
773- appState . theme === THEME . LIGHT
772+ renderConfig . theme === THEME . LIGHT
774773 ? "#7affd7"
775774 : applyDarkModeFilter ( "#1d8264" ) ;
776775 }
0 commit comments