File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/feedback/src/screenshot/components Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ export function ScreenshotEditorFactoryv2({
193
193
}
194
194
} , [ currentRect ] ) ;
195
195
196
- function drawBuffer ( ) : void {
196
+ const drawBuffer = hooks . useCallback ( ( ) : void => {
197
197
const ctx = imageBuffer . getContext ( '2d' , { alpha : false } ) ;
198
198
const measurementDiv = measurementRef . current ;
199
199
if ( ! imageBuffer || ! ctx || ! imageSource || ! measurementDiv ) {
@@ -222,7 +222,7 @@ export function ScreenshotEditorFactoryv2({
222
222
drawRect ( rect , grayCtx ) ;
223
223
} ) ;
224
224
ctx . drawImage ( grayWashBufferBig , 0 , 0 ) ;
225
- }
225
+ } , [ drawCommands ] ) ;
226
226
227
227
const drawScene = hooks . useCallback ( ( ) : void => {
228
228
const graywashCanvas = graywashRef . current ;
You can’t perform that action at this time.
0 commit comments