From 4118d78a7f71f98462074159462969200c237a51 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Mon, 5 Dec 2022 00:26:38 -0300 Subject: [PATCH] fix for eyedropper rendering Signed-off-by: Victor Seiji Hariki --- js/ui/tool/colorbrush.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/tool/colorbrush.js b/js/ui/tool/colorbrush.js index c460534..2cbdfd7 100644 --- a/js/ui/tool/colorbrush.js +++ b/js/ui/tool/colorbrush.js @@ -172,7 +172,7 @@ const colorBrushTool = () => uiCtx.arc( vcp.x, vcp.y, - state.eyedropper ? 50 : (state.brushSize / 2) * viewport.zoom, + (state.eyedropper ? 50 : state.brushSize / 2) * viewport.zoom, 0, 2 * Math.PI, true @@ -246,7 +246,7 @@ const colorBrushTool = () => state.leftclickcb = (evn) => { if (evn.target === imageCollection.inputElement && state.eyedropper) { const bb = getBoundingBox(evn.x, evn.y, 1, 1, false); - const visibleCanvas = getVisible(bb); + const visibleCanvas = uil.getVisible(bb); const dat = visibleCanvas .getContext("2d") .getImageData(0, 0, 1, 1).data;