mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-31 10:54:33 +01:00 
			
		
		
		
	Fix perf regression (#880)
This commit is contained in:
		| @@ -244,7 +244,9 @@ function generateElement( | |||||||
|   const zoom = sceneState ? sceneState.zoom : 1; |   const zoom = sceneState ? sceneState.zoom : 1; | ||||||
|   const prevElementWithCanvas = elementWithCanvasCache.get(element); |   const prevElementWithCanvas = elementWithCanvasCache.get(element); | ||||||
|   if (!prevElementWithCanvas || prevElementWithCanvas.canvasZoom !== zoom) { |   if (!prevElementWithCanvas || prevElementWithCanvas.canvasZoom !== zoom) { | ||||||
|     return generateElementCanvas(element, zoom); |     const elementWithCanvas = generateElementCanvas(element, zoom); | ||||||
|  |     elementWithCanvasCache.set(element, elementWithCanvas); | ||||||
|  |     return elementWithCanvas; | ||||||
|   } |   } | ||||||
|   return prevElementWithCanvas; |   return prevElementWithCanvas; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pete Hunt
					Pete Hunt